Job Parameter List

<job parameter list>

      ┌◄───────────────── , ────────────────┐
── ( ─┴─┬─<Boolean parameter declaration>─┬─┴─ ) ──────────────────────┤
        ├─<integer parameter declaration>─┤
        ├─<real parameter declaration>────┤
        └─<string parameter declaration>──┘

<Boolean parameter declaration>

── BOOLEAN ── <Boolean formal parameter> ─┬──────────┬─────────────────►
                                          └─ NOLIST ─┘
►─┬──────────────────────────────────────────────────────────────┬─────┤
  └─ OPTIONAL ─┬─────────────────────────────────────────────────┤
               └─ DEFAULT ── = ── <Boolean constant expression> ─┘

<integer parameter declaration>

── INTEGER ── <Integer formal parameter> ─┬──────────┬─────────────────►
                                          └─ NOLIST ─┘
►─┬──────────────────────────────────────────────────────────────┬─────┤
  └─ OPTIONAL ─┬─────────────────────────────────────────────────┤
               └─ DEFAULT ── = ── <Integer constant expression> ─┘

<real parameter declaration>

── REAL ── <real formal parameter> ─┬──────────┬───────────────────────►
                                    └─ NOLIST ─┘
►─┬───────────────────────────────────────────────────────────┬────────┤
  └─ OPTIONAL ─┬──────────────────────────────────────────────┤
               └─ DEFAULT ── = ── <real constant expression> ─┘

<string parameter declaration>

── STRING ── <string formal parameter> ─┬──────────┬───────────────────►
                                        └─ NOLIST ─┘
►─┬─────────────────────────────────────────────────────────────┬──────┤
  └─ OPTIONAL ─┬────────────────────────────────────────────────┤
               └─ DEFAULT ── = ── <string constant expression> ─┘

<Boolean formal parameter>

──<Boolean constant identifier>────────────────────────────────────────┤

<integer formal parameter>

──<integer constant identifier>────────────────────────────────────────┤

<real formal parameter>

──<real constant identifier>───────────────────────────────────────────┤

<string formal parameter>

──<string constant identifier>─────────────────────────────────────────┤

Explanation

A job parameter list declares constant identifiers and assigns them the values supplied in the START statement that initiated the job. The constant identifiers retain their original values throughout the job. They can be one of the following types:

  • BOOLEAN

  • INTEGER

  • REAL

  • STRING

These constant identifiers can be used in a WFL job in most of the places a constant or an expression of the appropriate type is permitted. (For example, a Boolean constant identifier can be used wherever a Boolean constant, Boolean constant expression or Boolean expression is permitted.)

The keyword NOLIST indicates that the parameter is not listed in the job summary, is suppressed from the list of parameters shown in response to an SQ (Show Queue) system command, and is suppressed from the analysis of a BOJ (Beginning of Job) log record.

The keyword OPTIONAL indicates that an actual parameter does not need to be passed for that job parameter. If an actual parameter is not passed, the default values are assigned as follows:

Type

Default Value

Boolean

FALSE

Integer

0

Real

0

String

"" (two double quotation marks)

Default values can also be specified with the DEFAULT clause following the keyword OPTIONAL. The specified default value is ignored if an actual parameter is provided.

A job parameter list can only be used in WFL jobs that are stored on disk and initiated through a CANDE, MARC, or WFL START statement. If a job initiated from another source includes a job parameter list, then it must be compiled for syntax only (see the description of the SYNTAX job disposition later in this section).

Note: A job that includes an AT <hostname constant> specification cannot have a job parameter list unless all the job parameters are optional and are not specified in the START statement.

When more than one job is stored in a disk file, none of the jobs can contain job parameter lists.

Example

Consider the statement START (WALLY)RUNPROG(23.8, 7), which initiates the following job:

?BEGIN JOB RUNPROG (REAL VAL1, REAL VAL2); 
  REAL INVAL; 
  INVAL := VAL2 * VAL2; 
  RUN OBJECT/WALLY/COUNTER(VAL1); 
  RUN OBJECT/WALLY/COUNTER(INVAL); 
?END JOB. 

This job runs the program OBJECT/WALLY/COUNTER twice, first with a parameter value of 23.8, and then with a parameter value of 49 (because INVAL was assigned the square of the VAL2 parameter).