NBSpool for MPE Reference Guide

Running NBSpool
2-17
LOOKUP Variables
NBSpool also has a class of variables that are created by the SET command and are available for use
in
WHILE commands. A limited set of these variables is also available for use outside WHILE
commands. LOOKUP variables are used to predefine a set of values based on spool file and user
attributes for use in NBSpool and MPE commands. The general form of
LOOKUP variables are:
Variable Description
CURR_key_name
Looks up values based on the current spool file.
LOOKUP_key_name
Looks up values based on the current user running NBSpool.
The following keys are available:
Key Description
DEVICE
Uses spool file’s device
class/number
as key.
JOBNAME
Uses spool file’s or user’s
job/session
name as key.
NAME
Uses spool file’s
name
as key.
USER
Uses spool file’s or user’s
account
as key.
The
name
portion of the variable can be any string from
1
to
8
alphanumeric characters. The first
character must be alphabetic. For example:
0> SET VAR=QUEUE;USER=MGR.NETBASE;VALUE=’DEVSERV/HPLJQ’
0> SET VAR=QUEUE;USER=OPER.GL;VALUE=’ACCTSERV/LJ4’
In the previous example, two NBSpool variables have been created: CURR_USER_QUEUE and
LOOKUP_USER_QUEUE. The CURR_USER_QUEUE variable has one of three possible values for each
iteration of a
WHILE loop:
DEVSERV/HPLJQ if the current spool file was created by the user MGR.NETBASE.
ACCTSERV/LJ4 if the current spool file was created by the user OPER.GL.
No value for spool files created by all other users. In this case, the current command will be
ignored (if in a
WHILE loop).