Previous Topic: ENABLE Return CodesNext Topic: ENQ Return Codes


EPI ENQ—Enqueue a Virtual Terminal

The EPI ENQ command enqueues a virtual terminal or test for terminal ownership. If you do not issue this command to release an enqueued terminal, that terminal dequeues automatically when the REXX program ends. To enqueue more than one terminal, issue multiple ENQ commands in ascending order by terminal name. Request rules are the only AOF rules that can use this command.

EPI ENQ has the following format:

ADDRESS EPI "ENQ keywords"
{termname|*}
[NOWAIT|TEST|WAIT]
termname

Defines the name of the terminal that you want to enqueue.

*

The current terminal that is defined through the SETTERM command.

NOWAIT

(Optional) Tells EPI to assign ownership of the virtual terminal only if it is available immediately (otherwise, ownership is not assigned).

TEST

(Optional) Tells EPI to return control to the REXX program immediately and to set the return code to indicate the status of terminal ownership.

WAIT

(Optional) Tells EPI to wait until the virtual terminal is owned before returning control to the REXX program issuing the ENQ command. Specifying termname as the only ENQ operand has the same result as specifying the WAIT keyword.

Default: WAIT

EPI ENQ Sample Coding Statements

The following sample coding statement enqueues virtual terminal TERM1:

ENQ TERM1