When you compile a
COBOL program using the CICS compiler option,
the COBOL compiler works with the
integrated CICS translator to handle both native COBOL and embedded
CICS statements in the source
program.
When the compiler encounters CICS statements, and
at other significant points in the source program, the compiler
interfaces with the integrated CICS translator.
The translator
takes appropriate actions and then returns to the compiler,
typically indicating which native language statements to
generate.
Although you can
still translate embedded CICS statements separately, using the
integrated CICS translator is recommended.
Certain restrictions
that apply when you use the separate translator do not apply when
you use the integrated translator, and using the integrated
translator provides several
advantages:
- You can use Debug Tool
to debug the original
source instead of the expanded source that the separate CICS
translator provides.
- You do not need to separately translate the
EXEC CICS or EXEC DLI statements that are in copybooks.
- There is no intermediate data set for the
translated but not compiled version of the source program.
- Only one output listing instead of two is
produced.
- Using nested programs that contain
EXEC CICS statements is simpler.
DFHCOMMAREA and DFHEIBLK are generated
with the GLOBAL attribute in the outermost program.
You do not need
to pass them as arguments on calls to nested programs or specify
them in the USING phrase of the
PROCEDURE DIVISION header of nested programs.
- You can keep nested programs that contain
EXEC CICS statements in separate files, and include those
nested programs by using COPY statements.
- REPLACE statements can affect
EXEC CICS statements.
- You can compile programs that contain
CICS statements in batch.
- Because the compiler generates binary fields
in CICS control blocks with format COMP-5 instead of
BINARY, there is no dependency on the setting of the
TRUNC compiler option.
You can use any setting of the
TRUNC option in CICS programs, subject only to the
requirements of the application logic and use of user-defined
binary fields.