gtpg2m5lGeneral Macros

VOPNC-Open a Data Set

Use this general macro to open a virtual storage access method (VSAM) data set.

Format




label
An optional label can be used with this macro.

addr
This parameter specifies the address of the access method control block (ACB) for the data set that is being opened. 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, two data sets are opened.

         .
         .
         .
         VGENC BLK=ACB,                Generate an ACB
               DDNAME=TPFPNID,         ..DDname
               MACRF=(KEY,DIR,IN)      ..Options
 
         BNZ   ERROR                   Process Errors
         LR    R1,R14                  Save ACB (1) pointer in R1
 
         VGENC BLK=ACB,                Generate an ACB
               DDNAME=TPFPNIG,         ..DDname
               MACRF=(KEY,DIR,IN)      ..Options
 
         BNZ   ERROR                   Process Errors
         LR    R2,R14                  Save ACB (2) pointer in R2
 
         VOPNC ACB=(R1)                Open PNIDFILE
         BNZ   ERROR                   ..Open error
 
         VOPNC ACB=(R2)                Open PNIGFILE
         BNZ   ERROR                   ..Open error
         .
         .
         .
TPFPNID  DC    CL8'PNIDFILE'           Data Definition Name (1)
TPFPNIG  DC    CL8'PNIGFILE'           Data Definition Name (2)