gtpg2m5gGeneral Macros

VCLSC-Close a Data Set

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

Return Conditions

Programming Considerations

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