HLL semantics determine how you code your main routine in order to receive a parameter list.
You should consider the environment (MVS™, TSO, IMS™, CICS®) in which your main routine is invoked, as well as the commands used to invoke it.
Language | Recommended options setting | Sample main routine code |
---|---|---|
C or C++ (See note 1.) | In C, specify PLIST(HOST) runtime option; if not specified, PLIST(HOST) is on by default. Under C++, this is the default behavior; do not specify a PLIST compiler option setting. |
|
C or C++ (See note 2.) | In C, PLIST(HOST) is the default; PLIST(TSO) is supported for
compatibility and acts the same as PLIST(HOST). argc and argv are
set from the command buffer. In C++, this
is the behavior by default. To see the TSO CPPL, specify PLIST(OS) and access the CPPL through __osplist. In C++, you must specify the PLIST(OS) compiler option. |
For PLIST(HOST) behavior, see above. The following code
is a sample that accesses the TSO CPPL:
|
COBOL (See note 1.) | No specific options required. |
|
COBOL (See note 2.) | No specific options required. | Same as above. |
PL/I (See note 1.) | Specify SYSTEM(MVS) compiler option. |
|
PL/I (See note 2.) | Specify SYSTEM(TSO) compiler option. |
|
Method of invocation:
|
Language | Recommended options setting | Sample main routine code |
---|---|---|
C | Specify PLIST(OS) and ENV(IMS) runtime option. |
|
C++ | Specify PLIST(OS) and TARGET(IMS) compiler option. |
|
COBOL | No specific options required. |
|
PL/I | Specify SYSTEM(IMS) compiler option. |
|
Language | Recommended options setting | Sample main routine code |
---|---|---|
C or C++ | Do not specify any PLIST option. argc = 1 and argv[0] = transaction id. |
|
COBOL | No specific options required. |
|
PL/I | Specify SYSTEM(CICS) compiler option. |
|
Language | Recommended options setting | Sample main routine code |
---|---|---|
C or C++ | In C, specify PLIST(OS) runtime option. In C++, specify PLIST(OS) compiler option. |
|
COBOL | No specific options required. |
|
PL/I | Specify SYSTEM(MVS) and NOEXECOPS procedure option. |
|