CLOSE return and reason codes
When your program receives control after it has issued a CLOSE macro, a return code in register 15 indicates whether all VSAM data sets were closed successfully (see Table 1).
Return Code | Meaning |
---|---|
0(X'0') | All data sets were closed successfully. |
4(X'4') | At least one data set (VSAM or non-VSAM) was not closed successfully. |
If register 15 contains 4, use SHOWCB to display the ERROR field in each access method control block to determine if a VSAM data set was not closed successfully and the reason it was not. See SHOWCB—Display fields of an access method control block. Table 2 gives the reason codes the ERROR field may contain following close processing.
Reason Code | Meaning |
---|---|
0(X'0') | No error (set when register 15 contains 0). |
4(X'4') | The data set indicated by the access method control block is already closed. |
129(X'81') | CLOSE TYPE=T was issued for a VSAM data set that is not open for VSAM processing. |
132(X'84') | An uncorrectable I/O error occurred while VSAM was reading the job file control block (JFCB). |
136(X'88') | Not enough virtual storage was available in your program's address space for a work area for close processing. |
144(X'90') | An uncorrectable I/O error occurred while VSAM was reading or writing a catalog record. |
145(X'91') | An uncorrectable error occurred in the VSAM volume data set (VVDS). |
148(X'94') | An unidentified error occurred while
VSAM was searching the catalog.
For a z/OS UNIX file, an unidentified error occurred. |
167(X'A7') | For RLS, abend occurred during open or close processing. |
170(X'AA') | For RLS, the required CF Cache is unavailable from this system. |
171(X'AB') | The close was successful, but the data set is in use by a unit of recovery that is still inflight. |
172(X'AC') | Close was successful, but DFSMStvs was unable to write a close record to the log of logs, the forward recovery log, or both. |
184(X'B8') | An uncorrectable I/O error occurred while VSAM was completing outstanding I/O requests. For a z/OS UNIX file, an error occurred while flushing output data or when disconnecting from the file. |
185(X'B9') | LSR/GSR - Error in WRTBFR: I/O for data set not quiesced before WRTBFR TYPE=DS during close processing. |
188(X'BC') | The data set indicated by the ACB
is not the type that may be specified by an ACB.
For RLS, an invalid ACB address is specified for close processing. |
236(X'EC') | System logic error because the function no longer is supported. |
246(X'F6') | A call to compression management services (CMS) failed. |
In addition to these reason codes, VSAM writes a message to the operator's console and the programmer's listing further explaining the error. For a description of messages, see z/OS MVS System Messages, Vol 6 (GOS-IEA).