Terminating

End-of-file does not terminate sequential input. Use CESF GOODNIGHT as the last transaction, to close the device and stop reading from the device.

Otherwise, CICS invokes the terminal error program (DFHTEP), and issues the messages in Table 1 at end-of-file on the sequential device.

Table 1. Warning messages if a sequential terminal is not closed
Message Destination
DFHTC2507 date time applid Input event rejected return code zz {on line w/term|at term}termid {, trans}tranid{, rel line=} rr,time CSMT
DFHTC2500 date time applid {Line|CU|Terminal} out of service {Term|W/Term} termid CSMT

Using CESF GOODNIGHT puts the sequential device into RECEIVE status and terminates reading from the device. However, if you close an input device in this way, the receive-only status is recorded in the warm keypoint at CICS shutdown. This means that the terminal is still in RECEIVE status in a subsequent warm start, and CICS does not then read the input file.

You can also use CESF LOGOFF to close the device and terminate reading from the device, but CICS still invokes DFHTEP to issue messages DFHTC2507 and DFHTC2500 at end-of-file. However, the device remains in TTI status, and is available for use when restarting CICS in a warm start.

If you want CICS to read from a sequential input data set, either during or following a warm start, you can choose one of the following methods:
  • Close the input with CESF LOGOFF, and ignore the resultant messages. This leaves the terminal in TTI state, and CICS reads input automatically in the next startup.
  • Do not close the input, and ignore the resultant messages. This leaves the terminal in TRANSCEIVE state, and CICS reads input automatically in the next startup.
  • Close the input with CESF GOODNIGHT. This puts the sequential terminal into RECEIVE status and terminates reading from the terminal. In this case, it is recommended that you code a PLT program to change the status of the terminal to TRANSCEIVE.
  • Code a user program, to be invoked from the program list table (PLT), to issue the appropriate EXEC CICS INQUIRE and EXEC CICS SET commands for each sequential device that is required to process input. For example, use the following statement to establish the state of a sequential terminal:
    EXEC CICS INQUIRE TERMINAL(termid) SERVSTATUS(cvda) TTISTATUS(cvda)
    For each terminal where SERVSTATUS returns DFHVALUE(INSERVICE) and TTISTATUS returns DFHVALUE(NOTTI), set the terminal to TRANSCEIVE with the following statement:
    EXEC CICS SET TERMINAL(termid) TTI

    For programming information about the use of EXEC CICS INQUIRE and EXEC CICS SET commands, see System commands. For programming information about writing post initialization-phase programs, see Writing initialization programs.

If you use BSAM devices for testing purposes, the final transaction to close down CICS could be CEMT PERFORM SHUT. The receive-only status is recorded in the warm keypoint at CICS shutdown. This means that on a subsequent warm start of CICS, the terminal is still in RECEIVE status and CICS does not then read the input file.

If you use the CEMT PERFORM SHUT, perform a cold or initial start of the CICS region to read the input file. This assumes that recoverability of resources is not important to you.