z/OS DFSMS Macro Instructions for Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example: SHOWCB macro (display a physical error message)

z/OS DFSMS Macro Instructions for Data Sets
SC23-6852-02

In this example, a SHOWCB macro is used to display a physical error message. This example assumes that there is no SYNAD routine (or the SYNAD exit is inactive). In this case, VSAM returns control to your program following the last executable instruction if a physical error occurs. Register 15 indicates a physical error (12), and the feedback field in the request parameter list contains a code identifying the error. The message area contains more details about the error. Register 1 points to the request parameter list.
REQUEST RPL    MSGAREA=MESSGES, MSGLEN=128                             x
        .
        SHOWCB AREA=MSGADDR,                                           x
               FIELDS=MSGAREA,                                         x
               LENGTH=4,                                               x
               RPL=REQUEST
 
        LTR    15,15
        BNZ    CHECKO
        .
CHECKO  ...                         Display failed.
        .
MESSGES DS     CL128                 For VSAM to give you a detailed   x
                                     message about a physical error.
 
MSGADDR DS     F                     For displaying the address of the x
                                     message area with SHOWCB.

The RPL macro in this example provides for a message area, MESSGES, of 128 bytes to be used for any physical error message.

The SHOWCB macro's parameters are:
  • AREA and LENGTH specify a 4-byte area, MSGADDR, used for displaying the address of the message area for the associated request parameter list.
  • FIELDS specifies the address of the message area is displayed.
  • RPL specifies the name, REQUEST, of the request parameter list for which the message area address is displayed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014