IBMBBGK*

IBMBBGK is a PL/I resident library routine that concatenates, repeats, or assigns one nonaligned bit string to another. The module's three entry points use an internal subroutine that obtains data from a source, aligns it correctly, and moves it to the target field.

Hints

High processing in IBMBBGK can often be avoided. The module is used to handle bit switches or bit strings. If the variable is a single bit switch, declaring it as a CHAR rather than B (binary) will avoid the module. The module might also be avoided by using ALIGNED bit declarations. The following examples show three assignments. Only the first calls the IBMBBGK module. The other two ways do not.

Line 40 is an assignment from one variable to another bit string which is not defined as ALIGNED.

 

39 1 0 ASSIGN_UNALIGNED_GK PROCEDURE;

40 2 0 BIT_VECTOR(19) = TRUE;

41 2 0 END;

Line 43 assigns a constant. IBMBBGK is not called.

 

42 1 0 ASSIGN_LITERAL_NO_GK: PROCEDURE;

43 2 0 BIT_VECTOR(19) = '1'B;

44 2 0 END;

Line 46 assigns a variable to a bit string defined as ALIGNED. IBMBBGK is not called:

 

45 1 0 ASSIGN_ALIGNED_NO_GK: PROCEDURE;

46 2 0 BIT_VECTOR_ALIGNED(19) = TRUE;

47 2 0 END;

Use aligned variables or constants to eliminate processing in IBMBBGK.

Reference Sources

OS PL/I Resident Library: Program Logic, LY33-6008.