gtpg2m5i | General Macros |
Use this general macro to generate the following:
The ACB is used to access a virtual storage access method (VSAM) data set. It can be generated in automatic storage that is maintained by VSAM database support on data level DF or in a user area by coding the WAREA parameter.
The RPL is used to control an active request on a VSAM data set. Storage for the RPL can be generated in automatic storage that is maintained by VSAM database support on data level DF or in a user area by coding the WAREA parameter.
Format
|
Entry Requirements
Return Conditions
Programming Considerations
Examples
. . . VGENC BLK=ACB, Generate an ACB DDNAME=DDNAME, ..DDname MACRF=(KEY,DIR,IN) ..Options BNZ ERROR Process Errors ST R14,EBW000 Save ACB pointer in ECB . . . DDNAME DC CL8'TRANSLOG' Data Definition Name
. . . LA R3,DDNAME Point to DDname string VGENC BLK=ACB, Generate an ACB AM=VSAM, ..Access method is VSAM DDNAME=(R3), ..DDname MACRF=(KEY,SEQ,IN), ..Options WAREA=EBW000, ..Storage area for ACB LENGTH=ACBSIZE ..Size of ACB storage area BNZ ERROR Process Errors ST R14,EBW000 Save ACB pointer in ECB . . . DDNAME DC CL8'TRANSLOG' Data Definition Name
. . . MVC EBW040(8),KEYVALUE Setup search key argument LA R2,EBW034 4 byte area - holds data pointer LA R5,D4 Data Level for RPL operations VGENC BLK=RPL, Generate an RPL LEVEL=(R5), ..Data Level is D4 ACB=EBX000, ..ACB location in ECB AM=VSAM, ..Access method is VSAM AREA=(R2), ..Area to hold data pointer AREALEN=4, ..data pointer is 4 bytes RECLEN=EBW038, ..Put 2 byte data length here ARG=EBW040, ..Pointer to search argument OPTCD=(KEY,DIR,SYN,LOC,KGE) ..Key search,direct access, ..synchronous,return buffer, ..search for key >= argument BNZ ERROR Process Errors ST R14,EBW000 Save ACB pointer in ECB . . . DDNAME DC CL8'TRANSLOG' Data Definition Name KEYVALUE DC CL8'00000001' Search Key value
. . . VGENC BLK=RPL, Generate an RPL AM=VSAM, ..Access method is VSAM ACB=(R6), ..ACB pointer is in R6 LEVEL=D3, ..Data Level is D3 AREA=16(R4), ..Area to hold data pointer AREALEN=4, ..data pointer is 4 bytes RECLEN=20(R4), ..Put 2 byte data length here ARG=15(R5), ..Pointer to search argument OPTCD=(KEY,DIR,LOC,KEQ) ..Key search, direct access, ..return data buffer, ..search for key = argument BNZ ERROR Process Errors LR R7,R14 Save RPL pointer in R7 . . .