NBSpool for MPE Reference Guide

Background Processing
5-13
WHILE Parameters
Parameter Description
subset
This parameter specifies the subset of spool files to be passed to the following
commands. Turn to Chapter 2 for information on working with subsets.
filename
This parameter specifies the name of an ASCII file containing one or more
NBSpool commands.
SHOW
This parameters displays each command as they are executed. By default, only
commands that fail are echoed.
WHILE Examples
To save all
$STDLIST
s to a sequence of disk files, enter:
O> :SETJCW COUNT 0
O> WHILE $STDLIST
W> T !CURRENT
W> :SETJCW COUNT COUNT+1
W> K DISK!COUNT.DATA
W> END
Note. The
COUNT
JCW can be substituted anywhere in a command within NBSpool.
In this example, the currently texted file will be kept to a disk file called
DISKnnn.DATA
, where
nnn
is the number of spool files qualifying.
Using WHILE for Complex Processing
The
WHILE
command can be used inside an
XEQ
block to cause a sequence of commands to be
executed on spoolfiles one at a time for each spoolfile, rather than each command operating on all
qualifying spoolfiles at once, for example:
XEQ;WAIT=60
WHILE $,STATE=READY,PRI=8
ALTER !CURRENT,"CIERR","FSERR","ABORT";PRI=1
VSAVE !CURRENT,%1;FILE=ERRORS.ARCHIVE
BANNER !CURRENT,%1
ALTER !CURRENT,%1;PRI=13
VSAVE !CURRENT,%8;FILE=STDLIST.ARCHIVE;PURGE
END
END