You can use C #pragma runopts to specify to the C compiler a list of options to be used at run time. Two of the options of #pragma runopts affect the format of the argument list passed to the application on initialization: EXECOPS and PLIST.
EXECOPS allows you to specify runtime options on the command line or in JCL at application invocation. NOEXECOPS indicates that runtime options cannot be so specified. When the EXECOPS runtime option is specified under MVS™, Language Environment alters the MVS parameter list format: Language Environment removes any runtime options that are present.
The PLIST(HOST) setting allows the object to execute under MVS (assuming a halfword-prefixed string), or under TSO (using the CPPL or the MVS-format parameter list). Specify PLIST(HOST) to default to the argument list format for the operating system under which your application is running.
Operating system | Method of invocation | PLIST suboption | EXCECOPS (default) | arg/argv | __R1/__osplist and PCBs |
---|---|---|---|---|---|
MVS | EXEC PGM=, PARM= <runtime options> / <user args> |
HOST | Yes. <runtime options> honored | argc = number of tokenized args in <user
args> argv[0…argc-1] = tokenized args in <user args> |
|
MVS | EXEC PGM=, PARM= <runtime options> / <user args> |
HOST | No. <runtime options> ignored | argc = number of tokenized args in the entire
PARM string, that is, <runtime options> / <user args>
argv[0…argc-1] = tokenized args in the entire PARM string |
|
MVS | Assembler calls C module with pre-Language Environment preinitialization PLIST with runtime options specified in the PLIST | MVS | Yes. <runtime options> honored | argc/argv = <argc,argv> structure specified in the preinitialization PLIST | |
MVS | Assembler calls C module with pre-Language Environment preinitialization PLIST with runtime options specified in the PLIST | MVS | No. <runtime options> ignored | argc/argv = <argc,argv> structure specified in the preinitialization PLIST | |
MVS | Driver link to C main passing noncharacter parameter list | OS | n/a | argc=1 argv[0] = name of C main program module |
Access register 1 through __osplist macro as defined in stdlib.h |
TSO | CALL, LOADGO, execute module on TSO command line passing <runtime options> / <user args> | HOST | Yes. <runtime options> honored | argc = number of tokenized args in <user
args> argv[0…argc-1] = tokenized args in <user args> |
|
TSO | CALL, LOADGO, execute module on TSO command line passing <runtime options> / <user args> | HOST | No. <runtime options> ignored | argc = number of tokenized args in <runtime
options> / <user args> argv[0…argc-1] = tokenized args in <user args> |
|
TSO | CALL | OS | n/a | argc=1 argv[0] = name of module |
Access CPPL through __osplist as defined in stdlib.h |
IMS | Invoke C main module | OS or IMS Specify ENV(IMS) also. |
n/a | argc=1 argv[0] = 0 |
Access PCBs through C macros as defined in ims.h |
CICS | Invoke C main module | n/a | n/a | argc=1 argv[0] = transaction id |