Initiating and allocating a session from CICS

CICS® can initiate a session in one of several ways.

  • The session can be initiated explicitly by use of AUTOCONNECT YES on the DEFINE CONNECTION (or CONNECT=AUTO on the DFHTCT TYPE=TERMINAL) macro. When CICS is initiated, it attempts to establish all sessions for which AUTOCONNECT is specified. In order for session initiation to occur, IMS must be active when CICS is initiated.
  • The master terminal operator can initiate a session by entering the command:
    CEMT SET TERMINAL(tttt) ACQUIRED|COLDACQ
    where tttt is the SESSNAME on the DEFINE SESSIONS or the TRMIDNT on the DFHTCT TYPE=TERMINAL.

    If ACQUIRED is specified, normal resynchronization with the IMS is attempted.

    If COLDACQ is specified, no resynchronization is performed.

    The status of the CICS half session is typed over in the display area of the CEMT INQUIRE|SET TERMINAL command. If the session is initiated successfully, the status is changed from REL to ACQ. If the attempt to initiate the session is unsuccessful, an error message is written to the transient data destination CSMT.

  • A session can be initiated implicitly by an application program using the ALLOCATE command. The ALLOCATE command is used on the SEND/RECEIVE interface only.
    Recommendation: Use the ALLOCATE SYSID form of this command, because it allows CICS to select an available session.
    If a session is not immediately available, control is returned to the application program in the following situations:
    • A HANDLE CONDITION for this condition is issued by the application program.
    • NOQUEUE is specified on the ALLOCATE command.

    Otherwise, the command is queued.

    The following conditions cause a session to be not immediately available:
    • All sessions to the specified system (or the specified session) are in use.
    • The only available sessions are not bound.
    • The only available sessions are contention losers.
  • A session can be initiated by CICS automatic task initiation (ATI).

The bind parameters for CICS are built from a hard-coded model. The RECEIVESIZE and SENDSIZE parameters on the DEFINE CONNECTION/SESSION (or the RUSIZE and BUFFER parameters on the DFHTCT TYPE=TERMINAL/SYSTEM) are used to determine the primary and secondary RU sizes.

Related reading: For more information on the ALLOCATE command, and subsequent processing, see CICS Transaction Server for z/OS® CICS Intercommunication Guide.