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 CICSTS31.CICS libraries in which they can be found, are summarized in Table 46.

Table 46. 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:
    1. If GNTRAN_PSEUDO_CONV_FLAG indicates that the terminal timed out during a pseudoconversation, issues EXEC CICS RECEIVE to retrieve the communications area.
    2. Saves the length of the communications area in another field within GNTRAN_USER_FIELD.
    3. Writes the communication area, if any, to a temporary storage queue.
    4. Displays a screen asking the user to input his or her password, and sets the flag indicating that this has been done.
    5. Issues EXEC CICS RETURN with TRANSID GNIT and the COMMAREA option, to continue the timeout process as a pseudoconversation.
  3. If this is not the first invocation for this timeout:
    1. Recovers the original communication area, if any, from the temporary storage queue.
    2. Checks the password received from the user, and redisplays the timeout screen with an error message if it is incorrect.
  4. If the number of incorrect responses exceeds the maximum specified to your external security manager, DFH0GNIT returns immediately with TRANSID CESF, which tries to sign off the userid.
  5. If the correct password is entered, DFH0GNIT:

    If the terminal timed out during a pseudoconversational transaction, DFH0GNIT also:

Related concepts
Writing a "good night" program
Related tasks
Customizing the sample "good night" program
Related reference
The communications area of the "good night" program
[[ Contents Previous Page | Next Page Index ]]