The external data queue is a sequence of strings that are stored internally within the Rexx environment. All data queue interactions are simple line interactions. When Rexx passes control to commands, these commands may add lines to the external data queue, or extract lines from the data queue.
Rexx programs interact with the data queue with the following instructions.
|parse pull||extracts the most recently pushed line|
|push||pushes the line to be extracted next|
|queue||queues a line to be extracted last|
|pull||an abbreviation of parse upper pull|
When no lines remain in the data queue, the parse pull instruction reads a line from the default input stream instead.
The number of lines in the data queue can be determined by using the queued built-in function.
Portability note: other Rexx implementations use the following additional data queue capabilities: