Session allocation
You acquire an LUTYPE6.1 session to a remote IMS system by means of the ALLOCATE command.
ALLOCATE {SYSID(name)|SESSION(name)}
[PROFILE(name)]
[NOQUEUE]
You can use the SESSION option to request the use of a specific session to the remote IMS system, or you can use the SYSID option to name the partner system and allow CICS to select an available session. The use of the SESSION option is not normally recommended, because it can result in an application program queuing on a specific session when others are available. In most cases, therefore, you use the SYSID option to name the system with which the session is required.
If CICS cannot find the named system, or all sessions to that system are out of service, it raises the SYSIDERR condition. If CICS cannot find the named session, or that session is out of service, it raises the SESSIONERR condition.
The PROFILE option allows you to select a specified communication profile for an LUTYPE6.1 session. The profile, which is set up during resource definition, contains a set of terminal control processing options that are to be used for the session.
If you omit the PROFILE option, CICS uses the default profile DFHCICSA. This profile specifies INBFMH(ALL), which means that incoming function management headers are passed to your program and cause the INBFMH condition to be raised.
- All the sessions to the specified system are in use.
- The only available sessions are not bound (in which case CICS would have to bind a session).
- The only available sessions are contention losers (in which case CICS would have to bid to begin a bracket).
- HANDLE for SYSBUSY condition
- Control is returned immediately to the label specified in the HANDLE command, whether or not you have specified NOQUEUE.
- No HANDLE for SYSBUSY condition
- If you have specified NOQUEUE, control is returned immediately to your application program. A RESP value of DFHRESP(SYSBUSY) is returned. You should test this field immediately after issuing the ALLOCATE command.
- If you have omitted the NOQUEUE option, CICS queues the request until a session is available.
Whether a delay in acquiring a session is acceptable is dependent on your application.
Similar considerations apply to an ALLOCATE command that specifies SESSION rather than SYSID. The associated condition is SESSBUSY.