gtpg2m5j | General Macros |
Use this general macro to get a virtual storage access method (VSAM) database support record.
Format
|
Entry Requirements
Return Conditions
Programming Considerations
Examples
In the following example, a VGETC macro is used to retrieve all records by key sequentially. Retrieval is in a forward direction and processing is synchronous. Because the ARG parameter was not specified, VSAM database support starts at the beginning of the file. (Specifying 0 for the ARG and KGE parameters would also have the same effect.)
. . . VGENC BLK=ACB, Generate an ACB DDNAME=DDNAME, ..DDname MACRF=(KEY,SEQ,IN) ..Access is Keyed-Sequential BNZ ERROR Process Errors L R6,R14 Save ACB pointer in R7 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=EBW000, ..Area to hold data pointer AREALEN=4, ..data pointer is 4 bytes OPTCD=(KEY,SEQ,SYN,LOC) ..Key search, sequential access, ..return data buffer, synchronous ..start scan at first record BNZ ERROR Process Errors LR R7,R14 Save RPL pointer in R7 LOOP DS 0H VGETC RPL=(R7) Get next record in sequence BNZ CHKEOD Check for End of Data L R4,EBW000 Point to data record ... B LOOP Continue scan . . . DDNAME DC CL8'TRANSLOG' Data Definition Name