Acquire a session with a terminal.
ACQUIRE TERMINAL >>-ACQUIRE TERMINAL(data-value)--+----------------------+-------> +-NOQUEUE--------------+ +-QALL--+--------+-----+ | '-RELREQ-' | +-QNOTENAB-------------+ '-QSESSLIM--+--------+-' '-RELREQ-' >--+---------------------------------------------------+------->< '-USERDATA(data-value)--+-------------------------+-' '-USERDATALEN(data-value)-'
Conditions: INVREQ, LENGERR, NOTAUTH, TERMIDERR
The ACQUIRE TERMINAL command enables you to tell CICS to acquire a session with a particular terminal.
The terminal you specify must be a VTAM terminal, and it cannot be an APPC, LU6.1, or IRC session. It must already be defined to CICS, either in an installed TERMINAL definition or by the autoinstall process, and it must be local to the system on which the ACQUIRE TERMINAL is issued, not remote.
This means that, if the terminal was autoinstalled, you must issue the ACQUIRE command before CICS deletes the terminal definition.
CICS normally deletes an autoinstalled terminal definition if the session ends and is not reestablished within the interval specified in the AIRDELAY value in the system initialization table. The terminal does not have to be reacquired within this interval, however; after you issue the command, CICS suspends its time-out and does not delete the definition while waiting for the session to be reestablished.
CICS processes an ACQUIRE command by sending a SIMLOGON request to VTAM (the queueing options on the command are for VTAM use and correspond to those on a SIMLOGON request). The task that issued the command is dispatchable as soon as this occurs. It is not notified of the eventual result of the VTAM request, nor when the terminal is actually acquired, and the terminal does not become associated with the task.
The request is sent straight to VTAM unless the terminal is already in session with the requesting CICS system. If it is, and NOQUEUE or QNOTENAB are present, CICS rejects the request as invalid (because a SIMLOGON would fail under these circumstances). Otherwise, CICS stores the request until the terminal’s current session ends and then sends it to VTAM. For this reason, requests may be queued by VTAM in a different order from the order in which they were originally issued.
After it has been issued, an ACQUIRE TERMINAL request cannot be canceled, and you cannot ordinarily determine whether an ACQUIRE TERMINAL has been issued for a particular terminal.
If the other application is a CICS system, the RELREQ value of the terminal definition in that system determines whether the request to release the terminal is honored. RELREQ is specified on the TYPETERM definition associated with the terminal.