LINK or ATTACH Macro Instruction

Access method services is invoked through either the LINK or the ATTACH macro instruction.

You cannot use the IDCAMS ALLOCATE command after using ATTACH to call IDCAMS. If you do, ALLOCATE fails with an ATTACH return code.

The syntax of the LINK or ATTACH macro instruction is:

Command Parameters
[label] LINK|ATTACH EP=IDCAMS,
    PARAM=(optionaddr
      [,dnameaddr]
      [,pgnoaddr]
      [,iolistaddr]
      [,auxlistaddr]),
    VL=1
     
EP=IDCAMS
specifies that the program to be invoked is IDCAMS.
PARAM=
specifies the addresses of the parameters to be passed to IDCAMS. These values can be coded:
optionaddr
specifies the address of an option list, which can be specified in the PARM parameter of the EXEC statement and is a valid set of parameters for the access method services PARM command. If you do not want to specify any options, this address must point to a halfword of binary zeros. Figure 1 shows the format of the options list.
dnameaddr
specifies the address of a list of alternate ddnames for standard data sets used during IDCAMS processing. If standard ddnames are used and this is not the last parameter in the list, it should point to a halfword of binary zeros. If it is the last parameter, it can be omitted. Figure 1 shows the format of the alternate ddname list.
pgnoaddr
specifies the address of a 3- to 6-byte area that contains an EBCDIC starting page number for the system output file. If the page number is not specified, but this is not the last parameter in the list, the parameter must point to a halfword of binary zeros. If it is the last parameter, it can be omitted. If omitted, the default page number is 1. Figure 1 shows the format of the page number area.
iolistaddr
specifies the address of a list of externally controlled data sets and the addresses of corresponding I/O routines. If no external I/O routines are supplied, this parameter can be omitted. Figure 1 shows the format of the I/O list.
auxlistaddr
specifies the address of the auxiliary list. Figure 1 shows the format of the auxiliary list.
VL=1
causes the high-order bit of the last address parameter of the PARAM list to be set to 1.