IBM SC34-6814-04 Server User Manual


 
Chapter 32. 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 user’s terminal-timeout period
expires.
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
terminal’s TYPETERM definition.
Note:
1. 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 CICS-supplied transactions cannot.
For further information about GNTRAN, see the CICS System Definition Guide.
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 definition, GNIT, that points to
DFH0GNIT.
CICS passes the “good night” program a parameter list in the communications area
shown in Figure 128 on page 802. If a terminal times out during a
pseudoconversational transaction, your program could, using information in the
parameter list:
v Ask for and check a response from the user
v Restore the screen left by the timed-out transaction
v Restore the cursor position
v Receive the communications area of the timed-out transaction, which is passed
to the “good night” transaction as an input message
v Return with the TRANSID of the next transaction in the conversation.
The communications area of the “good night” program
Figure 128 on page 802 shows the communications area passed to the “good night”
program.
© Copyright IBM Corp. 1977, 2011 801