When you run a C or C++ application, you can override the default
values for a set of z/OS® XL C/C++ runtime options. These options affect the
execution of your application, including its performance, its error-handling
characteristics, and its production of debugging and tuning information.
For your application to recognize runtime options, either the EXECOPS
compiler option, or the #pragma runopts(execops) directive
must be in effect. The default compiler option is EXECOPS.
You can specify runtime options under
z/OS batch as follows:
- In your JCL, in the PARM parameter of the EXEC statement. For
more information, refer to Specifying runtime options in the EXEC statement.
- On the GPARM parameter of the cataloged procedures that are supplied
by IBM. Refer to Using cataloged procedures.
- The #pragma runopts statement
in your source code.
- The CEEUOPT facility that is provided by the Language Environment® services.
- In the assembler user exit. For more information on the assembler user exit, refer to
the z/OS XL C/C++ Programming Guide.
If EXECOPS is in effect, use a slash '/' to separate runtime options
from arguments passed to the application. For example:
GPARM='STORAGE(FE,FE,FE)/PARM1,PARM2,PARM3'
Language Environment services interpret the character string that precedes
the slash as runtime options. The character string following the slash
is passed to the main() function of your application as
arguments. If a slash does not separate the arguments, Language Environment services interpret
the entire string as an argument.
If the NOEXECOPS option is in effect, none of the preceding runtime
options will take effect. In fact, any arguments and options that
you specify in the parameter string (including the slash, if present)
are passed as arguments to the main() function. For a description
of runtime options see Specifying runtime options.
You should establish the required settings of the options for all
z/OS XL C/C++ programs
that you execute on a production basis. Each time the program is run,
the default runtime options that were selected during
z/OS XL C/C++ installation
apply, unless you override them by using one of the following:
- Coding a #pragma runopts directive
in your source
- Creating a CEEUOPT csect with the CEEXOPT macro and linking this
csect into the program module.
- Specifying runtime options in the EXEC or GPARM statements
Example: The following example shows you
how to run your program under
z/OS batch. Partitioned data set member
MEDICAL.ILLNESS.LOAD(SYMPTOMS) contains
your
z/OS XL C/C++ executable program. The program was compiled with the
EXECOPS compiler option in effect. If you want to use the runtime
option RPTOPTS(ON), and to pass
TESTFUNCT as an argument
to the function, use the JCL stream as follows:
Figure 1. Running
your program under z/OS batch⁄⁄JOBname JOB...
⁄⁄STEP1 EXEC PGM=SYMPTOMS,PARM='RPTOPTS(ON)⁄TESTFUNCT'
⋮
⁄⁄STEPLIB DD DSN=MEDICAL.ILLNESS.LOAD,DISP=SHR
⁄⁄ DD DSN=CEE.SCEERUN,DISP=SHR