Where allowed to run:
|
Parameters Examples Error messages |
The Include CL Source (INCLUDE) command includes external text into the source program being compiled. The external text must be valid CL commands that are valid in a compiled CL source. These commands can be declare statements (like DCL or DCLF), control flow statements (like IF or Select), or regular CL commands (like CRTLIB or RMVM). However, the included text cannot cause declare commands to appear after non-declare commands.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
SRCMBR | Source member | Name | Required, Positional 1 |
SRCFILE | Source file | Single values: *INCFILE Other values: Qualified object name |
Optional, Positional 2 |
Qualifier 1: Source file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB |
Top |
Specifies the source member that contains the CL program source to be included.
This is a required parameter.
Top |
Specifies the source file that contains the source member to be included.
Single Values
Qualifier 1: Source file
Qualifier 2: Library
Top |
Example 1: Include CL Source Using Default INCLUDE File
INCLUDE SRCMBR(DCLSET1) SRCFILE(*INCFILE)
This command will cause the CL program source in member DCLSET1 to be included at compile time. Member DCLSET1 must be located in the file specified for the INCFILE parameter on the CL command which invoked the CL compiler.
Example 2: INCLUDE Source From Specified File
INCLUDE SRCMBR(SUBR1) SRCFILE(MYLIB/COMMONSUBR)
This command will cause the CL program source in member SUBR1 to be included at compile time. Member SUBR1 must be located in file COMMONSUBR in library MYLIB.
Top |
None
Top |