gtpg2m5iGeneral Macros

VGENC-Generate an Access Method Control Block or Request Parameter List

Use this general macro to generate the following:

Format




label
A symbolic name can be assigned to the macro statement.

BLK=ACB
Specifies that an ACB will be generated.

AM=VSAM
Specifies that the access method using this control block is VSAM.

DDNAME=ddname
Specifies an 8-character name that identifies the VSAM cluster you want to process. The TPF system appends 4 characters to the data definition (DD) name, as follows:

MACRF
Specifies processing options as follows:

ADR
Specifies the address access to a key-sequenced or entry-sequenced data set. Relative byte addresses (RBAs) are used as search arguments. Sequential access is by entry sequence.

KEY
Specifies keyed access to a key-sequenced data set. Keys or RBAs are used as search arguments. Sequential access is by key or RBA.

DIR
Specifies direct access to a key-sequenced or entry-sequenced data set.

SEQ
Specifies sequential access to a key-sequenced or entry-sequenced data set.

IN
Open the data set for input.

WAREA
Specifies the address of an area for the ACB or RPL to be generated.
Note:
If you do not specify an area for the ACB or RPL to be generated, VSAM database support gets working storage for the area.

LENGTH
Specifies the length, in bytes, of the area that you are designating (in the WAREA parameter) for VSAM database support to generate the ACB or RPL. The maximum value of the LENGTH parameter is 65 535 (X'FFFF').

BLK=RPL
Specifies that an RPL will be generated.

ACB=addr
Specifies the address of the ACB that identifies the data set to which access is requested.

LEVEL
Specifies the data level or register to be used for input/output (I/O) as follows:

Dx
A data level is needed for the VGETC macro to get a record.
Note:
The data level may be shared by more than one RPL.

Rx
You can enter the equate value for the level in a register to help in loop processing.

AREA
Specifies the address of the data record that was retrieved for I/O requests that were processed with the OPTCD parameter set to LOC. For I/O requests that were processed with the OPTCD parameter set to MVE, VSAM database support moves the record into this work area.

AREALEN
Specifies the length, in bytes, of the work area whose address is specified by the AREA parameter. For I/O requests that were processed with the OPTCD parameter set to LOC, the area must be 4 bytes long to contain the address of a data record in the I/O buffer. For I/O requests that were processed with the OPTCD parameter set to MVE, the length must be at least the size of the record on disk; otherwise, an error will be returned.

ARG
Specifies the address of a field that contains the search argument for direct retrieval or positioning. For keyed access (that is, the request was processed with the OPTCD parameter set to KEY) the search argument is a full or generic key. If you specify a generic key (that is, the request was processed with the OPTCD parameter set to GEN) you must also specify in the KEYLEN parameter how many of the bytes of the full key you are using for the generic key. For addressed access (that is, the request was processed with the OPTCD parameter set to ADR) the search argument is an RBA.

KEYLEN
Specifies the length, in bytes, of the generic key (OPTCD=GEN) that you are using for a search argument. (The search argument is in the field addressed by the ARG parameter.) This parameter is required with a search argument that is a generic key. The value of the KEYLEN parameter must be from 1 to 255. For full-key searches, VSAM database support gets the key length from the catalog definition of the data set when you open that data set.

RECLEN
Specifies the address of a field to contain the length of the record that was retrieved from disk. The field is 2 bytes in length.

OPTCD
Specifies the parameters that govern the request.

ADR
Specifies addressed access to a key-sequenced or entry-sequenced data set. RBAs are used as search arguments and sequential access is by entry sequence.

KEY
Specifies keyed access to a key-sequenced data set. Keys are used as search arguments and sequential access is by key or RBA.

DIR
Specifies direct access to a key-sequenced or entry-sequenced data set.

SEQ
Specifies sequential access to a key-sequenced data set.

KEQ
Specifies that the key search criteria is met when the key of a record is equal to the key that was provided as a search argument (full or generic).

KGE
Specifies that the key search criteria is met when the key of a record is greater than or equal to the key that was provided as a search argument (full or generic).

FKS
Specifies that a full key is provided as a search argument.

GEN
Specifies that a generic key is provided as a search argument.

LOC
Specifies that VSAM database support leaves the data record in its I/O buffer for processing.

MVE
Specifies that VSAM database support moves the data record into the user-specified work space as defined in the AREA and AREALEN parameters.

SYN
Specifies that processing is synchronous (that is, the FINWC macro is used to get a record).

FWD
Specifies that sequential processing is in a forward direction.

Entry Requirements

Return Conditions

Programming Considerations

Examples