Behavior of a segmented program on CICS or IMS

On CICS® or IMS™, an EGL segmented program acts as follows when the user first invokes it:
  1. Performs initialization tasks, including a determination that the invocation is the user's first
  2. Gives control to the beginning of the program logic
  3. Implements each EGL converse statement in this way--
    1. Uses a work database to save program state, which is a set of user-specific values that reflect the current status of the user-program conversation. Included is the data for all records and forms. Also included is the information needed to run the program from the appropriate line.
    2. Commits data base and recoverable resources.
    3. Releases all locks.
    4. Does not retain database position, even if the database open statement includes the hold option.
    5. Converses a form.
    6. Ends.
When the user performs an action (to update business data, for example), the runtime system restores the program to memory. The program starts from the beginning again. The segmented program automatically acts as follows:
  1. Performs initialization tasks, including a determination that the invocation is a continuation of processing for this user
  2. Restores program state, including the data for all forms and records, as well as information about which converse statement ran in the program
  3. Reads the user's input and performs any edits
  4. Continues the cycle when implementing the next converse statement--
    1. Saves program state
    2. Commits database and recoverable resources
    3. Releases all locks
    4. Does not retain database position, even if the database open statement includes the hold option
    5. Converses a form or VGUI record
    6. Ends

Related concepts
Segmentation in text applications

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.