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 YESon the DEFINE CONNECTION (orCONNECT=AUTOon the DFHTCT TYPE=TERMINAL) macro. When CICS is initiated, it attempts to establish all sessions for whichAUTOCONNECTis 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:
where tttt is theCEMT SET TERMINAL(tttt) ACQUIRED|COLDACQSESSNAMEon theDEFINE SESSIONSor theTRMIDNTon theDFHTCT TYPE=TERMINAL.If
ACQUIREDis specified, normal resynchronization with the IMS is attempted.If
COLDACQis specified, no resynchronization is performed.The status of the CICS half session is typed over in the display area of the
CEMT INQUIRE|SET TERMINALcommand. 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
ALLOCATEcommand. TheALLOCATEcommand is used on the SEND/RECEIVE interface only.Recommendation: Use theALLOCATE SYSIDform 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 CONDITIONfor this condition is issued by the application program. NOQUEUEis specified on theALLOCATEcommand.
Otherwise, the command is queued.
The following conditions cause a session to benot 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
- 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.