Writing a good night
program
You can use the GNTRAN system initialization
parameter to specify a good night
transaction that you want CICS® to
invoke when a terminal times out.
The default value for GNTRAN is NO, which
means that CICS does not schedule a good night
transaction,
but instead tries to sign off the terminal user. Whether or not the
sign off is successful depends on the value of the SIGNOFF attribute
on the TYPETERM definition of the terminal.
Any transaction that you specify on the GNTRAN parameter must be able to handle the type of communication area it is passed when terminal timeout occurs. The CICS sign-off transaction, CESF, can do this, but CESN and all other supplied transactions cannot. For further information, see GNTRAN system initialization parameter.
Writing your own good night
program allows you to include
functions in addition to, or instead of, sign-off. For example, your
program could prompt the terminal user to enter their password, and
allow the session to continue if the correct response is received.
CICS supplies a sample good night
program,
DFH0GNIT, that demonstrates this, and a sample TRANSACTION resource,
GNIT, that points to DFH0GNIT.
good nightprogram a parameter list in the communications area shown in Figure 1. If a terminal times out during a pseudoconversational transaction, your program can perform the following actions, using information in the parameter list:
- Ask for and check a response from the user
- Restore the screen left by the timed-out transaction
- Restore the cursor position
- Receive the communications area of the timed-out transaction,
which is passed to the
good night
transaction as an input message - Return with the TRANSID of the next transaction in the conversation.