Running a Module Produced by the BIND or GENMOD Command

After you create a module using the GENMOD command and have issued the GLOBAL LOADLIB SCEERUN command, you can execute the module. Enter the module name on the command line and, optionally, pass the module both run-time options and parameters, as shown in the syntax below.

Read syntax diagramSkip visual syntax diagram modname program_parameter_string
program_parameter_string
Specifies the run-time options and program parameters passed to the main routine in the application. The run-time options and parameters that are passed to the main routine are normally separated by a slash. Run-time options and program parameters are discussed in z/OS: Language Environment Programming Guide.
In the following example, the GENMOD command is extended to show run-time options. In this example, PROGRAM1, PROGRAM2, and PROGRAM3 are TEXT files that are put into a module with a file name of PROGRAM1 and a file type of MODULE. PROGRAM1 is executed by typing its name on the CMS command line with a list of run-time options that you want to pass to it as follows:
GLOBAL TXTLIB SCEELKED USERTXT
LOAD PROGRAM1 PROGRAM2 PROGRAM3 (RLDSAVE RESET CEESTART
GENMOD PROGRAM1 (NOMAP
GLOBAL LOADLIB SCEERUN
PROGRAM1 RPTSTG(ON),RPTOPTS(ON)/

To use the GENMOD command, the LOAD is performed using the RLDSAVE option in this example. PL/I and C require the RESET CEESTART option of the LOAD command and the FROM CEESTART option of the GENMOD command. The slash at the end of the last line of this example is required for C/C++ or PL/I, except when NOEXECOPS is in effect. The slash needs to be at the beginning of the line for COBOL.