CICS | NOCICS

Category

Language element control

Pragma equivalent

None.

Purpose

Enables CICS® statements to be embedded in C/C++ source and passes them through the compiler without the need for an explicit preprocessing step.

When the CICS option is in effect, the compiler can pass suboptions to the integrated CICS translator. CICS suboptions are passed directly to the CICS translator and have no other effect on compilation of C/C++ source.

When the NOCICS option is in effect, the compiler will treat the CICS-specific keywords as normal identifiers.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-NOCICS-.                             
>>-+-CICS---+--+----------------------+------------------------><
               |    .-,----------.    |   
               |    V            |    |   
               '-(----suboptions-+--)-'   

Defaults

NOCICS

Parameters

For more information on CICS suboptions, refer to CICS Application Programming Guide.

Usage

Integrated CICS translation enables you to embed CICS statements in C/C++ source and pass them through the compiler without the need for an explicit preprocessing step. This permits a more seamless operation of C/C++ within the CICS environment, especially under z/OS® UNIX System Services, and may help with program readability and application maintenance. Comments and macros are also permitted within embedded CICS commands. Integrated CICS translation is supported for use with CICS Transaction Server for z/OS V3R1 and above.

The CICS compiler option must be used when compiling source containing embedded CICS statements.

The CICS option will appear in the options listing with the suboptions.

The #pragma XOPTS directive may also be used to pass options to the integrated CICS translator. #pragma XOPTS is not a pragma equivalent to the CICS compiler option; therefore, the CICS suboptions passed via #pragma XOPTS will be recognized only when the CICS option is specified. Refer to z/OS XL C/C++ Language Reference for more information regarding this pragma directive.

A CICS embedded command will take the form of: EXEC CICS_COMMAND_KEYWORD xxxx; where:
  • EXEC is a context-sensitive keyword. If the token following it is not recognized as a CICS keyword, then it is treated as part of the user name space.
  • CICS_COMMAND_KEYWORD is either CICS, DLI, or CPSM. CICS, DLI, and CPSM are context-sensitive keywords and have special meaning only in the EXEC statement. These tokens may be used by the application program in user-defined names.
  • xxxx is a command appropriate to the CICS_COMMAND_KEYWORD.
All text from EXEC up to the first semicolon will be processed by the CICS translator after C/C++ preprocessing. The command may span multiple lines.
Note: All keywords are case-insensitive, which means any combination of upper and lower-case characters may be used.

A CICS embedded command is expanded into a block statement and therefore can occur only at points in the code where a block statement is allowed.

A CICS embedded keyword will have the form of: CICS_KEYWORD(CICS_KEYWORD_VALUE) where:
  • CICS_KEYWORD is either DFHVALUE, DFHRESP, or EYUVALUE. These are reserved keywords and cannot be used in any other context. These keywords are case-insensitive.
  • CICS_KEYWORD_VALUE is a value that is appropriate to the CICS_KEYWORD.
The compiler will send the entire string to the CICS translator after macro substitution and all comments are stripped out.
The following items are permitted within both CICS embedded commands and CICS embedded keywords:
  • C/C++ comments
  • C/C++ macros
  • #if directives
  • #include directives
Use of all other preprocessor directives, including all #pragma directives, will result in undefined behavior. The comments will be stripped, and macros and permitted directives will be expanded before the command or keyword is sent to the CICS translator.

When the CICS option is specified with the PPONLY option, both CICS embedded commands and CICS embedded keywords will be preserved after all preprocessor macro substitution. #pragma XOPTS will be preserved as well.

Notes:
  1. The compiler will not check compiler options for compatibility with CICS. You can migrate to a later version of CICS without upgrading the compiler and still take advantage of previously incompatible features. You need to ensure that you have the required level of CICS Transaction Server on the target machines because the compiler does not check the TARGET option.
  2. The compiler will not check for compatibility between pre-translators. The compiler will allow multiple pre-translators to operate on a single source file; for example, EXEC CICS statements may be intermixed with EXEC SQL statements. You must ensure that this is semantically correct.

Predefined macros

__CICS__ is predefined to 1 when the CICS compiler option is in effect; otherwise, it is not defined.