z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Open/Close/EOV Errors

z/OS DFSMS Using Data Sets
SC23-6855-00

There are two classes of errors that can occur during open, close, and end-of-volume processing: determinate and indeterminate errors. Determinate errors are errors associated with an ABEND issued by OPEN, CLOSE, or EOV. For example, a condition associated with the 213 completion code with a return code of 04 might be detected during open processing, indicating that the data set label could not be found for a data set being opened. In general, the OPEN, CLOSE and other system functions attempt to react to errors with return codes and determinate abends; however, in some cases, the result is indeterminate errors, such as program checks. In such cases, you should examine the last action taken by your program. Pay particular attention to bad addresses supplied by your program or overlaid storage.

If a determinate error occurs during the processing resulting from a concurrent OPEN or CLOSE macro, the system attempts to forcibly close the DCBs associated with a given OPEN or CLOSE macro. You can also immediately end the task abnormally by coding a DCB ABEND user exit routine that shows the immediate termination option. For more information on the DCB ABEND exit see DCB ABEND Exit. You can also request the DELAY option. In that case, when all open or close processing is completed, abnormal end processing is started. Abnormal end involves forcing all DCBs associated with a given OPEN or CLOSE macro to close status, thereby freeing all storage devices and other system resources related to the DCBs.

If an indeterminate error (such as a program check) occurs during open, close, or EOV processing, no attempt is made by the system control program to complete concurrent open or close processing. The DCBs associated with the OPEN or CLOSE macro are forced to close status if possible, and the resources related to each DCB are freed.

To determine the status of any DCB after an error, check the OPEN (or CLOSE) return code in register 15 or test DCBOFOPN. See z/OS DFSMS Macro Instructions for Data Sets.

During task termination, the system issues a CLOSE macro for each data set that is still open. If the task terminates abnormally due to a determinate system ABEND for an output QSAM data set on tape, the close routines that would normally finish processing buffers are bypassed. Any outstanding I/O requests are purged. Thus, your last data records might be lost for a QSAM output data set on tape.

However, if the data set resides on DASD, the close routines perform the buffer flushing, which writes the last records to the data set. If you cancel the task, the buffer is lost.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014