Previous Topic: ENABLE Return Codes

Next Topic: ENQ Return Codes

EPI ENQ—Enqueue a Virtual Terminal

Use this command to enqueue a virtual terminal or test for terminal ownership. If no EPI DEQ command is issued to release an enqueued terminal, that terminal is dequeued 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.

This command has the following format:

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

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

*

The current terminal 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

Example: EPI ENQ

The following enqueues virtual terminal TERM1:

ENQ TERM1