<option assignment>
── OPTIONS ── = ─┬─ # ── <string primary ─────────────┬────────────────┤ │ ┌◄────────── , ──────────┐ │ └─ ( ─┴─┬─ ALL ──────────────┬─┴─ ) ─┘ ├─ ARRAYS ───────────┤ ├─ AUTORM ───────────┤ ├─ BACKUP ───────────┤ ├─ BASE ─────────────┤ ├─ BDBASE ───────────┤ ├─ CODE ─────────────┤ ├─ CRITICALBLOCK ────┤ ├─ DBS ──────────────┤ ├─ DEBUG ────────────┤ ├─ DSED ─────────────┤ ├─ FAULT ────────────┤ ├─ FILES ────────────┤ ├─ LIBRARIES ────────┤ ├─ LONG ─────────────┤ ├─ NOSUMMARY ────────┤ ├─ PDUMPONLY ────────┤ ├─ PRIVATELIBRARIES ─┤ ├─ SORTLIMITS ───────┤ ├─ TODISK ───────────┤ ├─ TOPRINTER ────────┤ └─ * ────────────────┘
Explanation
The OPTION attribute sets options for the task. The options for the task affect program dumps, job summary printing, backup-file handling, and other areas. The options of the OPTION attribute are explained in the Task Attributes Programming Reference Manual under the discussion of the OPTION attribute.
If an asterisk (*) is included in the OPTION assignment, then any options provided by a previous assignment are to be merged with the options specified by this assignment. If an asterisk is not included, then any options specified by a previous assignment are not retained when this assignment occurs.
The asterisk option is particularly useful when assigning options to an object code file as defaults, because it enables additional options to be specified at run time without causing the default options being overwritten.
The ALL option is equivalent to specifying all the other options. The ALL option has no effect on the program dump destination. If the PDUMPONLY, TODISK, or TOPRINTER designation option is needed, it must be explicitly mentioned. ALL cannot be specified within a string that is assigned to the OPTION task attribute.
Examples
The following example illustrates the use of the asterisk option:
COMPILE OBJECT/X WITH COBOL85 LIBRARY; % Compiles source file X and COMPILER FILE CARD (TITLE=X,KIND=DISK); % saves object code file OPTION=(FAULT); % OBJECT/X with FAULT option . % as default . . RUN OBJECT/X; % OBJECT/X runs with OPTION = (FAULT) . . . RUN OBJECT/X; % OBJECT/X runs with OPTION = (FAULT, OPTION = (*,ARRAYS,FILES); % ARRAYS,FILES)
The # <string primary> syntax enables string variables and expressions to be used to assign the option values. The parentheses around the option values can be omitted when this form of the syntax is used. The following job excerpt illustrates a use of this syntax.
STRING S; % Declares string variable S. S:="LONG,FAULT"; % Assigns option values to S. RUN OBJECT/WELLCOMP; % Runs the program with the options OPTION=#S; % LONG and FAULT set.
The parentheses before and after the option list are optional when the option assignment occurs in a task equation list, job attribute list, or compiler task equation list. However, the parentheses are required if the OPTION assignment occurs in a task declaration or task assignment statement. The following example illustrates OPTION assignments in each of these contexts:
?BEGIN JOB; OPTION = NOSUMMARY, BASE; % job attribute list TASK TVAR (OPTION=(ARRAY,AUTORM), MAXPROCTIME=73); % task declaration COMPILE OBJECT/X WITH ALGOL LIBRARY; COMPILER FILE CARD (TITLE = X); ALGOL OPTION = ARRAY, DSED; % compiler task equation list RUN OBJECT/Z; OPTION = LONG, FAULT; % task equation list TVAR (OPTION=(BACKUP),PRIORITY=50); % task assignment statement ?END JOB.