pseudoconversational sequence. (If the terminal did not time out during a
pseudoconversational sequence, the value of this field is meaningless.)
GNTRAN_SCREEN_LENGTH
The length of the screen buffer.
GNTRAN_CURSOR_POSITION
The cursor position.
GNTRAN_SCREEN_WIDTH
The width of the screen in use when the terminal timed out.
GNTRAN_SCREEN_HEIGHT
The height of the screen in use when the terminal timed out.
You can use GNTRAN_SCREEN_WIDTH and GNTRAN_SCREEN_HEIGHT to
decide whether to use the ERASE DEFAULT or ERASE ALTERNATE option
when restoring the user’s screen.
GNTRAN_USER_FIELD
This field is available for use by your “good night” user program. It is initialized
to binary zeroes and is not changed by CICS. You can use it to help develop a
pseudoconversational “good night” transaction.
GNTRAN_SCREEN_BUFFER
A variable length field containing the contents of the screen buffer.
The sample “good night” program, DFH0GNIT
The sample “good night” program is a pseudoconversational COBOL program
named DFH0GNIT. Copy books of the communications area passed to the “good
night” program are supplied in assembler language, COBOL, PL/I, and C. The
names of the supplied program, copy books, and mapset, and the CICSTS32.CICS
libraries in which they can be found, are summarized in Table 47.
Table 47. Sample “good night” program, copy books, and mapset
Language Member name Library
Program source: COBOL
only
DFH0GNIT SDFHSAMP
Copy books: Assembler
COBOL PL/I C
DFHSNGSD DFHSNGSO
DFHSNGSL DFHSNGSH
SDFHMAC SDFHCOB
SDFHPL1 SDFHC370
Mapset: DFH$GMAP SDFHSAMP
What the sample program does
The DFH0GNIT sample program:
1. Checks that it has been invoked for a terminal timeout, by testing the
GNTRAN_START_TRANSID field of the communications area passed by CICS.
If this contains anything other than 'CEGN', it quits.
2. If a flag within GNTRAN_USER_FIELD shows that this is the first invocation for
this timeout:
a. If GNTRAN_PSEUDO_CONV_FLAG indicates that the terminal timed out
during a pseudoconversation, issues EXEC CICS RECEIVE to retrieve the
communications area.
b. Saves the length of the communications area in another field within
GNTRAN_USER_FIELD.
Chapter 32. Writing a “good night” program 803