The format of the GENCB macro used to generate a request parameter list is:
[label] |
GENCB |
BLK=RPL |
The subparameters of the GENCB macro can be expressed as absolute numeric expressions, as character strings, as codes, as expressions that generate valid relocatable A-type address constants, in register notation, as S-type address constants, and as indirect S-type address constants. Subparameters with GENCB, MODCB, SHOWCB, and TESTCB, further defines these operand expressions.
All copies generated are identical; you must use MODCB to tailor them to specific requests. MODCB is described in MODCB—Modify an access method control block.
You can find out how long a request parameter list is with the SHOWCB macro, described in SHOWCB—Display fields of a request parameter list.
The LOC parameter is different from other GENCB parameters. If you code it on the list form, the execute form always overrides it. If you want LOC=ANY when using the list and execute forms, you must code it on the execute form. For more information, refer to GENCB—List form and GENCB—Execute form.
A non-zero value for TIMEOUT (or if TIMEOUT is not specified) specifies the time (in seconds) this program waits for the other program(s) to release the lock.
A value of zero specifies TIMEOUT processing is NOT to be performed by VSAM for this request. That is, if the record lock required by the request is held by another program, the program waits until the other program releases the lock regardless of how long that might be.If you did not specify an area in which the request parameter list is to be generated, VSAM obtains virtual storage space for the area (as specified by the LOC=keyword). Subpool 0 will be requested under the user's key and state. Users executing in key 0 and supervisor state will actually be assigned subpool 252. VSAM returns the address of the area in which the request parameter lists are generated in register 1, and the length of the area in register 0. You can find the length of each list by dividing the length of the area by the number of copies. You can then calculate the address of each list by using the length of each list as an offset.
If you are generating control blocks by issuing several GENCBs, specifying an area (WAREA and LENGTH parameters) for them allows you to address all of them with one base register and to avoid repetitive requests for virtual storage.