NBSpool for MPE Reference Guide

NBSpool Input Commands
4-33
WHILE
Like the XEQ command, the WHILE command allows you to repeatedly execute a set of commands.
Unlike
XEQ, the WHILE command executes the series of commands once per qualifying spool file.
Once all spool files are processed, the command terminates.
The subset is evaluated at the time the
WHILE command is entered. Any spool files qualifying at that
time will be used. Any files created after the
WHILE command is entered will be ignored, whether
they meet the subset or not.
To make this command work, two special NBSpool parameters are available during the execution
of the
WHILE command:
Parameter Description
!CURRENT
This parameter specifies the current spool file ID being processed. This value
changes each time through the
WHILE loop.
!NEW
If an NBSpool command causes a new spool file to be created, this parameter
will be set to the new spool file’s
ID. The value will remain available until
either another command which creates spool files is executed or when the end
of the current list of commands is reached.
These values are available anywhere in an NBSpool command line and act like actual MPE
variables. Note, however, that no MPE variables are set. Type
HELP VARIABLES for more
information on these variables.
The
WHILE command also supports the ERROR and END commands, and they have the same
function as in the
XEQ command. Turn to Chapter 5 for more information on the XEQ command.
WHILE Syntax
I> WHILE subset [;FILE=filename]
[;SHOW]