The access method control block (ACB) generated by this example
is built when the program is executed. In this example, the user
provides the storage to contain the ACB. 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,LEN1 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.
LA 10,ACBLNGTH Get length of the ACB.
GETMAIN R,LV=(10) Get storage for the area in which
the ACB is to be built.
LR 3,1 Save address of ACB area.
GENCB1 GENCB BLK=ACB,AM=VSAM, One copy generated; VSAM builds x
BUFND=4,BUFNI=3, the ACB in the storage provided x
BUFSP=19456, at the location pointed to by x
DDNAME=DATASETS, WAREA. x
LENGTH=ACBLNGTH, x
MACRF=(KEY,DIR, x
SEQ,OUT), x
RMODE31=ALL, x
WAREA=(3), x
MF=(G,(2),LEN1)
.
.
.
ANYNAME DSECT KEEP ACB model out of CSECT
ACBSTART ACB AM=VSAM
ACBEND DS 0F
ACBLNGTH EQU ACBEND-ACBSTART
The parameters of the GENCB macro follow:
- BUFND specifies four I/O buffers for data. BUFNI specifies three
I/O buffers for index entries. BUFSP specifies 19456 bytes of buffer
space, enough space to accommodate control intervals of data that
are 4096 bytes and of index entries that are 1024 bytes.
- DDNAME specifies that this access method control block is associated
with a DD statement named DATASETS.
- LENGTH specifies that the length of the storage you provide for
the ACB is the value of ACBLNGTH.
- MACRF specifies keyed direct and keyed sequential processing for
both insertion and update.
- RMODE31 specifies that VSAM obtain storage for the VSAM control
blocks and I/O buffers in an area above 16 megabytes when the ACB
is opened.
- WAREA specifies that the address of the storage you provide for
the ACB is held in register 3.
- MF specifies that the GENCB parameter list is to be built in the
location specified by register 2. Also, the expansion of the GENCB
macro will equate LEN1 to the length of the GENCB parameter list.