IBM OS/390 User Manual

Page of 673
15.1.6 Parameters Passed to a Main Program
It is possible to pass parameters to a PL/I program having the option MAIN by
declaring the entry point as follows:
P:PROCEDURE(PARAM) OPTIONS(MAIN);
DCL PARAM CHAR(100) VARYING;
When control is passed to the program, the character string PARAM will contain
the parameter passed from the PARM field of the EXEC statement. The length of
the character string will be set to the number of characters passed to the
program.
Note:
A main PL/I program always expects to receive parameters for the PL/I
environment (COUNT or REPORT or ISASIZE ....). It is therefore necessary to
separate these parameters from those required by the program by the character
′/′. 
For example:
EXEC PGM=MAINPLI;PARM=
REPORT,ISA(60K)/RESTART
The character string RESTART is allocated to the field PARAM and its length will
be set to seven bytes. If the PL/I Checkout Compiler is used, this parm string
may have three fields (Checkout Compiler translation parms (for example,
SOURCE), PL/I interpret time parms, and user data).
15.1.7 %INCLUDE
It is possible to specify in a %INCLUDE macro the DDname of the library which
is to be searched for the text to be copied. By default, PL/I will search the library
defined by the DDname SYSLIB.
%INCLUDE DCLFIC; the library to be searched is defined by:
//SYSLIB DD DSN=...
%INCLUDE MYLIB (DCLFIC); the library to be searched is defined by:
//MYLIB DD DSN=...
In DOS PL/I, this syntax existed with single-letter library identifiers for DOS
source sublibraries, (for example, %INCLUDE Q(memb);), so the user may have
to supply DD cards for DDNAMES 
P
″, ″
Q
″, 
and so on. It is much more efficient to
include only from the default data set SYSLIB, since the MVS PL/I compilers will
OPEN and CLOSE other 
include
″ 
libraries at every reference.
15.2 Compiler Options
15.2.1 Options Specific to the DOS Compiler
15.2.1.1 CATALOG
This option is produced by the compiler from a CATALR statement. It is not valid
in MVS PL/I. It is replaced by a control statement in the file specified by
//SYSLIN DD DSN=.
Chapter 15. PL/I
335