Specifying runtime options and program arguments

To distinguish runtime options from program arguments that are passed to Language Environment, the options and program arguments are separated by a slash (/). For more information about program arguments, see Argument lists and parameter lists.

Runtime options usually precede program arguments whenever they are specified in JCL or on application invocation. The possible combinations are described in Table 1. You can override this format to ensure compatibility with COBOL applications. See COBOL compatibility considerations for more information.

Table 1. Formats for specifying runtime options and program arguments
When the following situations are present: Format
Only runtime options are present runtime options/
Only program arguments are present
  1. If a slash is present in the arguments, a preceding slash is mandatory.
  2. If a slash is not present in the arguments, a preceding slash is optional.
One of the following:
  1. /program arguments
  2. program arguments

    or

    /program arguments

Both runtime options and program arguments are present runtime options/program arguments

Use the callable service CEE3PRM and CEE3PR2 to retrieve program arguments (for more information, see z/OS Language Environment Programming Reference).

Usage note: Program arguments cannot be passed either by a CEEPRMxx parmlib member or by a CEEOPTS DD statement.
In the following example, an object module called MYPROG is created and run using the cataloged procedure CEEWLG. The code in the example overrides the Language Environment defaults for the RPTOPTS and MSGFILE runtime options.
//CEEWLG  JOB
//*
//LINKGO     EXEC CEEWLG,
//    PARM.GO='RPTOPTS(ON),MSGFILE(OPTRPRT)/'
//*
//LKED.SYSIN   DD DSN='userid.MYLIB.OBJLIB(MYPROG)',...DISP=SHR
//GO.OPTRPRT   DD SYSOUT=A
//*