Question & Answer
Question
Your CICS application receives a RESP=84 (DISABLED) or RESP=19 (NOTOPEN) when accessing a VSAM file because the file is allocated to a batch job. The file is dynamically allocated and you do not want to add a DD statement to the CICS startup job. The application needs the file and you would like to know: Can CICS Transaction Server for z/OS (CICS TS) be made to wait until the file is available?
Cause
The reasons your application receives DISABLED and NOTOPEN responses are documented in the CICS TS 6.x documentation under the EXEC CICS commands used to access VSAM files, such as READ, WRITE, and DELETE:
84 DISABLED
RESP2 values:
- 50
- A file is disabled because it was initially defined as disabled and has not since been enabled.
A file is disabled because it has been disabled by a SET FILE or a CEMT SET FILE command.
Default action: terminate the task abnormally.
19 NOTOPEN
RESP2 values:
- 60
- NOTOPEN (RESP2 60) is returned for one of the following reasons:
- The requested file is CLOSED and UNENABLED. The CLOSED, UNENABLED state is reached after a CLOSE request has been received against an OPEN ENABLED file and the file is no longer in use. You can also make CLOSED, UNENABLED the initial state, by specifying STATUS(UNENABLED) and OPENTIME(FIRSTREF) on the FILE resource definition. (For BDAM files, you use the FILSTAT parameter of DFHFCT TYPE=FILE.)
- The requested file is OPEN and in use by other transactions, but a CLOSE request against the file has been received.
- A READ command is issued against a data set that is quiesced, or is being quiesced, as a result of a SET DSNAME QUIESCED or IMMQUIESCED command.
- The requested file is CLOSED and ENABLED, so CICS has tried to open the file as part of executing the request. This file open has failed for some reason. You should examine the console for messages that explain why the file open has been unsuccessful.
This condition does not occur if the request is made to a CLOSED, DISABLED file. In this case, the DISABLED condition occurs.
Default action: terminate the task abnormally.
Answer
CICS can not be made to wait for the file to be allocated but you can change your CICS application program to wait until the file is available:
Note: If coding this solution, the open should be successful once the batch job releases the file. However, to ensure that this code does not result in an endless loop, you should consider issuing a WRITE OPERATOR with REPLY after issuing the delay a set amount of times. In the WRITE OPERATOR message, you could ask an operator to check the status of the batch job or the file with manual intervention.
- Include the EXEC CICS INQUIRE FILE command to check the file status before trying to access the file within your application.
- If the OPENSTATUS is OPEN and the ENABLESTATUS is ENABLED, then your application can continue processing.
- If the OPENSTATUS is NOT OPEN OR the ENABLESTATUS is NOT ENABLED, then you could include the EXEC CICS SET FILE( ) OPENSTATUS(OPEN) ENABLESTATUS(ENABLED) command to explicitly open and enable the file.
- If the OPEN is not successful, use the EXEC CICS DELAY command for some time then retry the INQUIRE FILE after the time elapses (go back to step 1).
Note: If coding this solution, the open should be successful once the batch job releases the file. However, to ensure that this code does not result in an endless loop, you should consider issuing a WRITE OPERATOR with REPLY after issuing the delay a set amount of times. In the WRITE OPERATOR message, you could ask an operator to check the status of the batch job or the file with manual intervention.
Related Information
[{"Type":"MASTER","Line of Business":{"code":"LOB70","label":"Z TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"ARM Category":[{"code":"a8m0z000000cwgsAAA","label":"Data services and Data tables-\u003EVSAM files"}],"ARM Case Number":"","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"5.4.0;5.5.0;5.6.0;6.1.0;6.2.0"}]
Product Synonym
CICS/TS CICS TS CICS Transaction Server
Was this topic helpful?
Document Information
Modified date:
05 January 2026
UID
swg21461233