── START ─┬──────────────┬─┬──────────────┬─┬──────────────────┬───────► └─<file title>─┘ └─<parameters>─┘ ├───────┬─ SYNTAX ─┘ └─ FOR ─┘ ►─┬───────────────────────────────┬────────────────────────────────────► └─ ? ── = ──<special character>─┘ ►─┬─────────────────────────────────────────┬──────────────────────────┤ └─ ; ── STARTTIME ── = ──<starttime spec>─┘
<parameters>
── ( ─┬─<named parameter list>────────────────────────────────────┬────► └─<positional parameter list>─┬─────────────────────────────┤ └─ , ──<named parameter list>─┘ ►─ ) ──────────────────────────────────────────────────────────────────┤
<named parameter list>
┌◄──────────────────────────── , ────────────────────────────┐ ──┴─┬─<real formal parameter>── := ──<real expression>───────┬─┴───────┤ ├─<integer formal parameter>── := ──<integer expression>─┤ ├─<Boolean formal parameter>── := ──<Boolean expression>─┤ └─<string formal parameter>── := ──<string expression>───┘
<positional parameter list>
┌◄─────────── , ───────────┐ ──┴─┬──────────────────────┬─┴─────────────────────────────────────────┤ ├─<real expression>────┤ ├─<integer expression>─┤ ├─<Boolean expression>─┤ └─<string expression>──┘
<starttime spec>
──┬─<time>───────────────┬─┬────────────────────────────┬──────────────┤ ├─ + ──<time interval>─┘ ├─ TODAY ────────────────────┤ │ ├─ TOMORROW ─────────────────┤ │ └─ ON ─┬─<date>──────────────┤ │ └─ + ──<day interval>─┤ ├─<date>──────────────┬─ AT ─┬─<time>─────────────────┤ └─ + ──<day interval>─┘ └─ + ──<time interval>───┘
<time>
┌◄────────────┐ ┌◄─────────────┐ ──┴─/2\─<digit>─┴─ : ─┴─/2*\─<digit>─┴─────────────────────────────────┤
<date>
──┬─<mm>── / ──<dd>── / ─┬─<yy>───┬────────────────────────────────────┤ │ └─<yyyy>─┤ └─<julian date>─────────────────┘
<julian date>
┌◄─────────────┐ ──┬─┴─/7*\─<digit>─┴─┬─────────────────────────────────────────────────┤ │ ┌◄─────────────┐ │ └─┴─/5*\─<digit>─┴─┘
<mm>
┌◄────────────┐ ──┴─/2\─<digit>─┴──────────────────────────────────────────────────────┤
<dd>
┌◄────────────┐ ──┴─/2\─<digit>─┴──────────────────────────────────────────────────────┤
<yy>
┌◄─────────────┐ ──┴─/2*\─<digit>─┴─────────────────────────────────────────────────────┤
<yyyy>
┌◄─────────────┐ ──┴─/4*\─<digit>─┴─────────────────────────────────────────────────────┤
<time interval>
┌◄────────────┐ ┌◄─────────────┐ ──┴─/2\─<digit>─┴─ : ─┴─/2*\─<digit>─┴─────────────────────────────────┤
<day interval>
┌◄────────────┐ ──┴─/2\─<digit>─┴──────────────────────────────────────────────────────┤
Explanation
The START command instructs the WFL compiler to process the specified file title. If a file title is not specified, the current work file is processed.
START <file title>
When the START command is followed by a string of characters within parentheses, CANDE first determines if that string is part of a valid file title. If the string of characters within parentheses is not followed by a file name, then it is assumed to be a set of parameters for the current work file. If no work file is present, then the following error message is displayed.
NO WORKFILE
The current work file does not need to be saved before it can be started with the specified parameters. The following is an example of the START command specifying a set of parameters to be used for the current work file.
START (123)
Parameters Option
The parameters construct is any arbitrary list of constants (that is, integer, real, string, or Boolean) recognized by WFL. It can be included in the START command if the job being initiated includes a job parameter list.
Parameters can be passed by listing them in positional order (positional parameters) or by explicitly naming them (named parameters). Refer to the WFL Programming Reference Manual for the definitions of real expression, integer expression, Boolean expression, and string expression which can be used in the named and positional parameter lists.
Named Parameter List Option
Named parameters can be listed in any order, and are passed by the corresponding formal parameter in the job parameter list. The following is an example:
START JOB/1(JOBQUEUE := 4).
An actual parameter is not required to be passed if the corresponding formal parameter specifies the keyword OPTIONAL. If an actual parameter is not passed, the default value is assigned as follows:
Type |
Default Value |
Boolean |
FALSE |
Integer |
0 |
Real |
0 |
String |
"" |
A default value can also be assigned by using the DEFAULT clause for the corresponding formal parameter in the WFL job.
When using parameters with default values, an item such as a default queue or a default chargecode can be specified for a job and passed only when another queue or chargecode is desired.
When using optional parameters, default values can be specified for optional job parameters if values other than the standard defaults are desired.
Positional Parameter List Option
If a positional parameter list is used, optional parameters can be omitted by specifying consecutive commas or by specifying fewer actual parameters than formal parameters. When fewer parameters are passed than expected by the job, the remaining parameters in the job parameter list must be specified as optional. For additional information about the positional parameter list, refer to the WFL Programming Reference Manual.
Using Named Parameters and Positional Parameters in Combination
Combinations of parameter usage can be applied. Named parameters can be used with positional parameters. Positional parameters are listed in their normal position, followed by the named parameters. Once a named parameter is used, the remaining parameters must also be named parameters. This combination is particularly useful when the required job parameters are declared before optional parameters. The following is an example:
START JOB/2("OBJECT/X", JOBQUEUE: =4).
Named parameters can be used with optional parameters. For example, if a job has many parameters, the parameters can be specified as optional. The job can then be started by explicitly naming the parameters in the start parameter list. In such cases, only the necessary parameters are passed. For additional information about the named parameter list, refer to the WFL Programming Reference Manual.
SECURED Files
CANDE requires read access to the file specified in the START statement. Use the WFL START statement to start a secured file.
SYNTAX Option
The SYNTAX option specifies that the job is to be compiled only for syntax checking; the job will not be executed. When a job is compiled for syntax, it is not necessary to pass parameters to the job, even though the job is specified with parameters. However, WFL does check for the accuracy of the types of parameters if they are supplied. By default, the question mark (?) is interpreted by WFL to be an invalid character when found in column 1 of an input line. This default can be changed by specifying ?=<special character>, where <special character> represents the character that WFL is to interpret as the invalid character. (The invalid character is the equivalent of a 1-2-3 multipunch in an EBCDIC card deck.)
The resulting job is invoked separately from the session, although progress can be monitored through use of commands such as ?JA, ?MIX, ?C, and ?MSG.
STARTTIME Option
The invoked WFL compiler determines the absolute time and date at which the job should begin execution from the <starttime spec> construct. This start time overrides any start time specified in the job attribute specification list of the job that is being started. If the starttime specification is not supplied, the job is accepted for immediate processing. Refer to the WFL Programming Reference Manual for information about job attribute specifications.
Time Option
The <time> construct is the time of day on a 24-hour clock in the form HH:MM. HH, the hour, must be less than 24, and MM, the minute, must be less than 60.
Date Option
The <date> construct is the date in the form MM/DD/YY, MM/DD/YYYY, or in Julian date form. MM represents the two digits for the month, DD represents the two digits for the day, YY represents the last two digits of the year, and YYYY represents the four digits of the year. A leading zero (0) must be used for single-digit months and days.
The Julian date can be in the form YYDDD or YYYYDDD, in which YY are the last two digits of the year, YYYY represents the four digits of the year, and DDD is the number of the day of the year. For example, day 293 of the year 1994 can be represented in either of the Julian date formats:
94293 1994293
Time Interval Option
The <time interval> construct is of the form HH:MM. HH, the number of hours, must be less than 24, and MM, the number of minutes, must be less than 60.
Day Interval Option
The <day interval> construct specifies a number of days to be added to the current date.
Examples
START WFL/1 #RUNNING 7768 #JOB 7769 IN QUEUE 4 # #7769 BOJ TESTJOB #7769 DISPLAY:IN START JOB #7769\7769 EOJ JOB TESTJOB L TEST #FILE (UZER)TEST ON USERPACK 100 BEGIN JOB TEST/PARAM (INTEGER I, STRING S); 200 INTEGER J; 300 DO 400 BEGIN 410 DISPLAY S; 420 J:=J+1; 430 END 500 UNTIL J=I; 600 END JOB # START TEST(2,"HELLO") #RUNNING 4833 #JOB 4834 IN QUEUE 4 # #4834 BOJ TEST/PARAM #4834 DISPLAY:HELLO. #4834 DISPLAY:HELLO. #4384 #4384\4384 EOJ TEST/PARAM START WFL/EX/1; STARTTIME= 23:00 #RUNNING 1101 #JOB 1102 IN QUEUE 0 # L WFL/PARAMS #FILE (JOE)WFL/PARAMS ON USERS 100 BEGIN JOB WFL/PARAMS(STRING CODEFILE, 200 INTEGER JOBQUEUE OPTIONAL DEFAULT=3, 300 BOOLEAN BIND OPTIONAL); 350 CLASS = JOBQUEUE; 400 DISPLAY "CODEFILE = " & CODEFILE; 500 DISPLAY "JOBQUEUE = " & STRING(JOBQUEUE, *); 600 IF BIND THEN 700 DISPLAY "BINDING = TRUE" 800 ELSE 900 DISPLAY "BINDING = FALSE" 950 END JOB # START WFL/PARAMS("OBJECT/A") #RUNNING 9023 #JOB 9023 IN QUEUE 3 #9023 BOJ EXAMPLE