SYNADAF—Perform SYNAD analysis function (BDAM, BISAM, BPAM, BSAM, EXCP, QISAM, and QSAM)

The SYNADAF macro is used in an error analysis routine to analyze permanent input/output errors.The routine can be a SYNAD exit routine specified in a data control block for BDAM, BISAM, BPAM, BSAM, QISAM, QSAM, or a routine specified in a DCBE for BPAM, BSAM, QSAM, or a routine that is entered directly from a program that uses the EXCP or XDAP macro. (The EXCP and XDAP macros are described in z/OS DFSMSdfp Advanced Services.)

The SYNADAF macro uses register 1 to return the address of an area containing a message. The message describes the error, and can be printed by a later PUT, WRITE, or WTO macro. The message consists mainly of EBCDIC information and is in variable-length record format. The format of the area is shown following the descriptions of the SYNADAF parameters.

For extended format data sets, PDSEs, or UNIX files, SYNADAF returns an additional message. The first message contains an 'S' at offset 127 to indicate that the second message exists. The second message is located at 8 bytes past the end of the first message. This second message provides additional information to further describe the error. It can be printed with another PUT, WRITE, or WTO macro.

The system does not save registers in the save area whose address is in register 13. Instead, it provides a save area for its own use, and then makes this area available to the error analysis routine. The system returns the address of the new save area in register 13 and in the appropriate location (third word) of the previous save area. The system also stores the address of the previous save area in the appropriate location (second word) of the new save area.

When the SYNADAF macro is issued in 31-bit addressing mode, the caller must ensure that the input save area address in register 13 is a valid 31-bit address. This would be true unless your program changes it.

The SYNADAF macro passes parameters to the system in registers 0 and 1. When used in a SYNAD exit routine, you should code the SYNADAF macro at the beginning of the routine. (See z/OS DFSMS Using Data Sets for information on the SYNAD exit routine.) For BISAM and QISAM, the SYNAD exit routine has to set up these parameters as explained under PARM1 and PARM2. To save these parameters for use by the SYNAD exit routine, the system stores them in a parameter save area that follows the message buffer as shown in the message buffer format. The second message immediately follows these two parameters.

The system does not alter the return address in register 14. On return from SYNADAF, the high order byte of register 15 has been modified. The low order three bytes are unchanged.

Restriction: Callers of SYNADAF in 31-bit addressing mode must either not use register 15 as a base register or restore the high order byte of register 15 on return from SYNADAF.

When a SYNADAF macro is used, you must use a SYNADRLS macro to release the message area and save area, and to restore the original contents of register 13.

The format of the SYNADAF macro is:

ACSMETH=BDAM, BPAM, BSAM, QSAM, BISAM, EXCP, or QISAM
specifies the access method that is used to perform the input/output operation when the SYNADAF macro performs error analysis. Code ACSMETH=EXCP if your program used an EXCP or XDAP macro.

Recommendation: Do not use BISAM, EXCP, XDAP or QISAM.

PARM1=parm register, iobaddr, or dcbaddr—(2-12) or (1)
specifies the address of information that is dependent on the access method being used. For BDAM, BPAM, BSAM, or QSAM, the parameter specifies a register containing the information that was in register 1 on entry to the SYNAD routine. For BISAM or QISAM, it specifies the address of the data control block. For EXCP, it specifies the address of the input/output block. If the parameter is omitted, PARM1=(1) is assumed.
PARM2=parm register, dcbaddr, iobaddr, or iobeaddr—(2-12), (0), or RX-Type
specifies the address of additional information that is dependent on the access method being used. For BDAM, BPAM, BSAM, QISAM, and QSAM, the parameter specifies a register containing the information that was in register 0 on entry to the SYNAD exit routine. For BISAM, the parameter specifies a register containing the information that was in register 1 on entry to the SYNAD exit routine (the address of the DECB). For EXCP, the parameter specifies the address of the IOBE only if your program provided the IOBE with the EXCP, EXCPVR or XDAP macro. If your program used 31-bit format 1 CCWS with an IOBE, this parameter is necessary. For all access methods if the parameter is omitted, PARM2=(0) is assumed.
To correctly load the registers for SYNADAF for BISAM, code these two instructions before issuing the SYNADAF macro:
    LR   0,1         GET DECB ADDRESS
    L    1,8(1)      GET DCB ADDRESS