Use this general macro to end all virtual storage access method (VSAM)
database support requests that are associated with an access method control
block (ACB), free its request parameter lists (RPLs), and release the
ACB.
Format
- label
- An optional label can be used with this macro.
- addr
- This parameter specifies the address of the ACB for the data set that is
being closed. You can specify the address in register notation (by
using a register enclosed in parentheses) or by using an expression that
generates an addressable data area.
Entry Requirements
- Register 9 (R9) must point to an entry control block (ECB) that contains a
valid VSAM context block anchored in field CE2VSAM.
- Registers 11 and 12 (R11 and R12) must contain the standard TPF ECB page
index values for ECB pages 2 and 3, respectively.
Return Conditions
- A condition code of 0 indicates that the data set was closed
successfully.
- A nonzero condition code indicates that the data set was not closed
successfully.
- Register 15 (R15) contains the error code.
Programming Considerations
- This macro can be run on any I-stream.
- This macro can be called only by E-type programs.
- This macro does not remove the data set from the TPF system.
- The contents of R10, R14, and R15 are destroyed; the contents of all
other registers are preserved.
Examples
In the following example, the VCLSC macro closes a data set and releases
the ACB.
.
.
.
VGENC BLK=ACB, Generate an ACB
DDNAME=DDNAME, ..DDname
MACRF=(KEY,DIR,IN) ..Options
BNZ ERROR Process Errors
LR R6,R14 Save ACB pointer in R6
VOPNC ACB=(R6) Open file
BNZ ERROR Process Errors
VGENC BLK=RPL, Generate an RPL
AM=VSAM, ..Access method is VSAM
ACB=(R6), ..ACB pointer in R6
LEVEL=D1 ..Use data level D1
VGETC RPL=(R7) Retrieve a record
BNZ ERROR Process Errors
VENDC RPL=(R7) End the request
BNZ ERROR Process Errors
VCLSC ACB=(R6) Close the file
BNZ ERROR Process Errors
.
.
.
DDNAME DC CL8'TRANSLOG' Data Definition Name