Example 1: SHOWCB macro (display an access method control block)

In this example, a SHOWCB macro is used to display fields in an access method control block. The fields displayed (KEYLEN, LRECL, and RKP) permit the program to modify variables to process any one of many data sets that have different sized key fields and records and different placements of key field in a record.
        SHOWCB ACB=CONTROL,                                           x
               AREA=DISPLAY,                                          x
               FIELDS=(KEYLEN,                                        x
               LRECL,RKP),                                            x
               LENGTH=12
 
DISPLAY DS     0F               Align on fullword boundary.
KEYLEN  DS     F
LRECL   DS     F
RKP     DS     F
The SHOWCB macro's parameters are:

This display allows the program to set up its variables for the particular data set it has opened.