Example: generate form (reentrant)

In this example, the generate form of GENCB is used to create a default request parameter list (RPL) in a reentrant environment.
       LA      10,LEN1          Get length of the parameter list.
 
       GETMAIN R,LV=(10)        Get storage for the area in which      x
                                the parameter list is to be built.     x
       LR      2,1              Save address of parameter-list area.
 
       GENCB   BLK=RPL,                                                x
               MF=(G,(2),LEN1)
The macro expansion equates LEN1 to the length of the parameter list, as follows:
+LEN1 EQU 16

The parameter list is built in the area acquired by the GETMAIN macro and pointed to by register 2. This list is used by VSAM to build the RPL. VSAM returns the RPL address in register 1 and the RPL length in register 0. If the WAREA and LENGTH parameters are used, the RPL is built at the WAREA address.