INCLUDE Option

<include control option>

──┬─ $ ──┬─ INCLUDE ──<file title constant>────────────────────────────►
  └─ $$ ─┘
──┬───────────────────┬─┬──────────────────────────┬───────────────────┤
  └─<sequence number>─┘ └─ TO ─┬─<sequence number>─┤
                               └─ END ─────────────┘

<sequence number>

  ┌◄─/7\────┐
──┴─<digit>─┴──────────────────────────────────────────────────────────┤

Explanation

This option incorporates card images from another file into the current job during compilation. An INCLUDE option can appear in a job stored in a disk file and initiated by a START. The text is included each time the job is initiated. The file title constant is the name of the file that contains the included text. The FILEKIND of the file must be JOBSYMBOL.

If NEWSOURCE is specified and the dollar sign ($) is in column 1, the card images specified by the INCLUDE control option is written to the new source file where the option appeared in the old source file. If the dollar sign is in column 2, the INCLUDE control option is written to the new source file, but the card images specified by that option is not. The included text is in the WFL job listing in the job summary printout.

If a sequence range is specified, only that portion of the file is included. If the sequence range is omitted, the entire file is included.

The included records can themselves contain INCLUDE options; in this way, included source input can be nested up to five levels deep.

After parsing the job attribute list, WFL runs under the USERCODE , FAMILY, and EXECUTEPATH attribute specifications of the job (if they are supplied).

If an INCLUDE is encountered in the job heading, the usercode, family, and execute path of the initiator are used to locate the file and determine access. If an INCLUDE is encountered in the job body, the usercode, family and execute path seen in the job heading (if any are supplied) are used to locate the file and determine access.

Note: The value of the EXECUTEPATH attribute and not the DATAPATH is used. This is because the system applies execute access to INCLUDE files.

A job started from the ODT without a usercode can also include a file in the same directory as the started job if the INCLUDE occurs in the job heading.

Example

The following partial job uses the INCLUDE option to incorporate text from the file CARDLINE/ATTRIBUTES, which is located on the MYPACK pack, into the ZZZ job during compilation:

?BEGIN JOB ZZZ;
RUN SYSTEM/CARDLINE;
$INCLUDE CARDLINE/ATTRIBUTES ON MYPACK
.
.
.
?END JOB.