Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
DCB ABEND Exit z/OS DFSMS Using Data Sets SC23-6855-00 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The DCB ABEND exit is provided to give you some options regarding the action you want the system to take when a condition occurs that may result in abnormal termination of your task. This exit can be taken any time an abend condition occurs during the process of opening, closing, or handling an end-of-volume condition for a DCB associated with your task. However, it is not taken if an EOV abend condition occurs during the CLOSE issued by task termination. The exit is taken only for determinate errors that the system can associate with the DCB. When an abend condition occurs, your DCB ABEND exit is given control,
provided there is an active DCB ABEND exit routine address in the
exit list contained in the DCB being processed. If your exit does
not give return code 20, then a write-to-programmer message about
the abend is issued. If STOW called the end-of-volume routines to
get secondary space to write an end-of-file mark for a PDS, or if
the DCB being processed is for an indexed sequential data set, the
DCB abend exit routine is not given control if an abend condition
occurs. When your exit routine is entered the contents of the registers
are the same as for other DCB exit list routines, except that the
3 low-order bytes of register 1 contain the address of the parameter
list described in Figure 1.
Figure 1. Parameter
List Passed to DCB Abend Exit Routine
Your ABEND exit routine can choose one of four options:
Not all of these options are available for each abend condition. Your DCB ABEND exit routine must determine which option is available by examining the contents of the option mask byte (byte 3) of the parameter list. The address of the parameter list is passed in register 1. Figure 1 shows the contents of the parameter list and the possible settings of the option mask when your routine receives control. When your DCB ABEND exit routine returns control to the system control program (this can be done using the RETURN macro), the option mask byte must contain the setting that specifies the action you want to take. These actions and the corresponding settings of the option mask byte are in Table 1.
Your exit routine must inspect bits 4, 5, and 6 of the option mask byte (byte 3 of the parameter list) to determine which options are available. If a bit is set to 1, the corresponding option is available. Indicate your choice by inserting the appropriate value in byte 3 of the parameter list, overlaying the bits you inspected. If you use a value that specifies an option that is not available, the abend is issued immediately. If the contents of bits 4, 5, and 6 of the option mask are 0, you must not change the option mask. This unchanged option mask results in a request for an immediate abend. If bit 5 of the option mask is set to 1, you can ignore the abend by placing a value of 4 in byte 3 of the parameter list. If you also wish to not have the determinant abend message issued as well, then either set bit 3 in byte 3 of the option mask on, or place a value of 20 in byte 3 of the parameter list. Either way, this action causes processing on the current DCB to stop and sets bit DCBOFOPN to off. There is no need to issue CLOSE. If you subsequently attempt to use this DCB other than to issue CLOSE or FREEPOOL, the results are unpredictable. If the application has a DCB ABEND EXIT, and this exit ignores an open determinate abend, OPEN gets a return code equal to zero, even though the DCB is not open. In this case, the application checks DCBOFOPN to see if the DCB really is open. If you ignore an end-of-volume error , the DCB is closed. The control is returned to your program at the point that caused the end-of-volume condition or after the FEOV macro. In this case, the application should check whether the DCB is really open before issuing any other macros using that DCB, other than CLOSE or FREEPOOL. . However, if the end-of-volume routines have been called by the CLOSE routines, control is not returned. In this situation, an ABEND macro is issued even though the IGNORE option has been selected. Note: For certain types of data set, the DCB ABEND
exit might be called during the READ or WRITE macro instead of during
the CHECK macro. As described in the previous paragraph, the system
might close the DCB before returning from READ or WRITE. The types
of data set are PDSE, UNIX files, spooled data sets, and compressed
format data sets.
If bit 6 of the option mask is set to 1, you can delay the abend by placing a value of 8 in byte 3 of the parameter list. All other DCBs being processed by the same OPEN or CLOSE invocation will be processed before the abend is issued. For end-of-volume, however, you can't delay the abend because the end-of-volume routine never has more than one DCB to process. If bit 4 of the option mask is set to 1, you can attempt to recover. Place a value of 12 in byte 3 of the parameter list and provide information for the recovery attempt. Table 2 lists the abend conditions for which recovery can be attempted. See z/OS MVS System Messages, Vol 7 (IEB-IEE); z/OS MVS System Messages, Vol 8 (IEF-IGD); z/OS MVS System Messages, Vol 9 (IGF-IWM); z/OS MVS System Messages, Vol 10 (IXC-IZP); and z/OS MVS System Codes.
|
Copyright IBM Corporation 1990, 2014
|