Alias:
DO-PREPROCESSING
This statement can be used to end the compilation of one or more source programs on completion of the preprocessor phase. During the preprocessing, an expanded and recompilable source program can be generated for each compilation unit.
PREPROCESS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SOURCE =
This option specifies one or more source programs to be compiled.
A source program can be read from the system file SYSDTA, a cataloged BS2000 file, a PLAM library or a POSIX file.
Note that if the source program is entered from SYSDTA, only one source program can be read per PREPROCESS statement.
SOURCE = *SYSDTA
Input is accepted from the system file SYSDTA. SYSDTA is assigned to the terminal in interactive mode but can be reassigned to a cataloged file or a PLAM library element with the ASSIGN-SYSDTA command (see also "Notes on input via SYSDTA").
SOURCE = <filename 1..54>
<filename> is the name of a cataloged BS2000 file.
SOURCE = <posix-pathname>
Only a file name is permitted as <posix-pathname>. See "Compiler I/O in the POSIX file system" for a description of the term <posix-pathname>.
SOURCE = *LIBRARY-ELEMENT(...)
This option is used to specify a PLAM library and an element in it.
LIBRARY = <filename 1..54>
<filename> assigns the name of a PLAM library.
LIBRARY = *LINK(...)
LINK-NAME = <filename 1..8>
<filename> is used to specify a link name for a PLAM library. The link name must already have been assigned to the library name with the ADD-FILE-LINK command before the compiler is called.
ELEMENT = <composed-name 1..64 with-under>(...)
<composed-name> identifies the fully-qualified name of an element from the PLAM library specified earlier. The element must be of type S.
VERSION = *HIGHEST-EXISTING
If the element specification contains no version ID, the compiler uses the element with the highest existing version.
VERSION = <composed-name 1..24 with-under>
The compiler uses the element with the specified version.
OUTPUT =
This option can be used to specify if and where the result of the preprocessor runis to be stored.
OUTPUT = *NONE
No expanded and recompilable source program is generated. The result of the preprocessor run (expansions and error messages, if any) can only be checked byrequesting a preprocessor listing.
OUTPUT = *STD-FILE
The expanded program is written by default to a cataloged BS2000 file. The name of this file is derived from the name of the source program as follows:
Output | *SYSDTA | BS2000 file | PLAM library | POSIX file |
Default name | CSTDEXP. | file. | lib-elem. | file. |
If the source program is located in a PLAM library, the library and element name of the source are combined with a hyphen (lib-elem) and used in the default file name. The rules by which the compiler constructs default names are described in detail in the section“Default names for output containers”.
OUTPUT = *SOURCE-LOCATION
The output destination and name of the expanded program are derived from the location and name of the source program as follows:
Source | *SYSDTA | BS2000 file | PLAM library | POSIX file |
Output | BS2000 file | BS2000 file | Library of source | Directory of source |
Default name | CSTDEXP. | file. | elem. | file.i (C source) |
The rules by which the compiler constructs default names are described in detail in section “Default names for output containers”.
OUTPUT = <filename 1..54>
The expanded program is written to a cataloged BS2000 file with the specified name. This specification is invalid when compiling multiple source programs.
OUTPUT = <posix-pathname>
The expanded program is written to a POSIX file system.
Both a file name and a directory are permitted as <posix-pathname>. See "Compiler I/O in the POSIX file system" for a description of the term <posix-pathname>.
When a file name is specified, the expanded program is stored under this name. Specification of a file name is invalid when compiling multiple source programs with one statement.
When a directory name dir is specified, the expanded program for each source program is written under the default name sourcefile.i (C source) or sourcefile.I (C++ source) to the directory dir (see also section “Default names for output containers”).
The directories specified with <posix-pathname> must already exist.
When constructing file names, it must be noted that expanded source programs can only be meaningfully processed further in the POSIX subsystem if the name contains the suffix .i
or .I
or a suffix defined with the -Y F
option of the cc
/c11
/c89
/CC
commands (see also the manual “POSIX Commands of the C/C++ Compiler” [1]).
OUTPUT = *LIBRARY-ELEMENT(...)
This option specifies the PLAM library (LIBRARY=) and the element name (ELEMENT=) under which the expanded program is to be stored. The elements are stored as elements of type S.
LIBRARY = *STD-LIBRARY
The expanded program is written by default to the library SYS.PROG.LIB.
LIBRARY = *SOURCE-LIBRARY
The expanded program is written to the PLAM library which contains the sourceprogram.
The *SOURCE-LIBRARY specification is invalid if the source program is read from a cataloged BS2000 file, a POSIX file or via SYSDTA.
LIBRARY = <filename 1..54>
The expanded program is written to a PLAM library with the specified name.
LIBRARY = *LINK(...)
LINK-NAME = <filename 1..8>
<filename> can be used to specify a valid link name for the PLAM library.
The link name must already have been assigned to the library name with theADD-FILE-LINK command before the compiler is called.
ELEMENT = *STD-ELEMENT(...)
By default, the element name of the expanded program is derived from the name of the source program as follows:
Output | *SYSDTA | BS2000 file | PLAM library | POSIX file |
Default name | CSTDEXP. | file. | elem. | file. |
The rules by which the compiler constructs default names are described in detail in the section “Default names for output containers”.
VERSION = *UPPER-LIMIT
If the element entry does not contain a version ID, the highest possible version is used by the compiler.
VERSION = *INCREMENT
The element is assigned a version number that is obtained by incrementing the highest existing version number by 1, assuming that the highest existing version ID ends with a digit that can be incremented. If the version ID cannot be incremented, the compiler run is aborted with an error message.
See the COMPILE statement ("COMPILE") for an example.
VERSION = <composed-name 1..24 with-under>The compiler uses the version specified.
ELEMENT = <composed-name 1..64 with-under>(...)<composed-name> designates the fully-qualified element name of the expanded program. This specification is invalid when compiling multiple source programs.
VERSION = *UPPER-LIMIT / *INCREMENT / <composed-name 1..24 with-under>
The version can be specified as described above for ELEMENT=*STD-ELEMENT(...).