Customizing the sample “good night” program

You can write your “good night” program in any of the languages supported by CICS®, with full access to the CICS application and system programming interfaces.

If you customize the supplied program, or write your own “good night” program, note the following:
  • Like the sample, your program should be pseudoconversational, because it could be invoked simultaneously for many users (if, for example, many terminals time out during the lunch period). If your program is conversational, CICS maximum number of tasks (MXT) could quickly be reached.

    When you are continuing your timeout program’s pseudoconversation, always specify the name of your “good night” transaction (for example, GNIT) as the next TRANSID. If you do not, CICS does not know that you are still handling the timeout, and results may be unpredictable.

  • Your program should always start, like the sample program, by testing the GNTRAN_START_TRANSID field of the communications area passed by CICS. If it finds that the “good night” transaction was started for any reason other than a terminal timeout (for example, by an EXEC CICS START request), timeout processing may not be appropriate.
  • To obtain the communications area of the timed-out transaction in a pseudoconversation, your program must issue an EXEC CICS RECEIVE command. (The communication area passed to it on invocation is not that of the timed-out transaction, but contains information about the timed-out transaction.)
  • If your program tries to sign off the terminal user, the result depends on what is specified on the SIGNOFF option of the terminal’s TYPETERM definition:
    YES
    The terminal is signed off, but not logged off.
    NO
    The terminal remains logged on and signed on.
    LOGOFF
    The terminal is both signed off and logged off.
  • Specify the identifier (TRANSID) of your “good night” transaction on the GNTRAN system initialization parameter.

    If you have customized the sample program, DFH0GNIT, specify the supplied sample transaction definition, GNIT.

    If you have written your own “good night” program, named something other than DFH0GNIT, you must create and install a transaction definition that points to your program, and specify this definition on the GNTRAN SIT parameter.