Example: GENCB macro (generate a request parameter list)

In this example, a GENCB macro is used to generate a request parameter list (RPL). In this example the user provides the storage to contain the RPL. Because the generate form of the macro is used, the GENCB parameter list is built in a remote area and passed to VSAM for action.
         LA    10,LEN2               Get length of the GENCB parameter
                                     list returned by the GENCB macro.
         GETMAIN R,LV=(10)           Get storage for the area in which
                                     the GENCB parameter list is to
                                     be built.
         LR    2,1                   Save addr of GENCB parameter-list
                                     area.
GENCB1   GENCB BLK=RPL,              One copy generated; VSAM builds    x
               ACB=ACCESS,           the RPL in the storage provided    x
               AM=VSAM,              at the location pointed to by      x
               AREA=WORK,            WAREA.                             x
               AREALEN=125,                                             x
               ARG=SEARCH,                                              x
               LENGTH=RPLLNGTH,                                         x
               MSGAREA=MESSAGE,                                         x
               MSGLEN=128,                                              x
               OPTCD=(SKP,UPD),                                         x
               WAREA=MYRPL,                                             x
               MF=(G,(2),LEN2)
               .
               .
               .
ACCESS   ACB   MACRF=(SKP,OUT)
WORK     DS    CL125
SEARCH   DS    CL8
MESSAGE  DS    CL128
         DS    0F
MYRPL    DS    CL(RPLLNGTH)          Storage in which the RPL is to be
                                     built.
ANYNAME  DSECT Avoid generation in CSECT
RPLSTART RPL   AM=VSAM
RPLEND   DS    0F
RPLLNGTH EQU   RPLEND-RPLSTART
The GENCB macro's parameters are: