The structure of a program that contains CICS commands is not much different from the simple COBOL programs; the main difference is that it will contain embedded CICS commands. But the following are some of the differences between a CICS application in COBOL and a COBOL program. The IDENTIFICATION DIVISION will be the same. In the ENVIRONMENT DIVISION only the division heading is required. The CONFIGURATION SECTION, INPUT-OUTPUT SECTION, FILE CONTROL, etc. are not needed.

In the DATA DIVISION the FILE SECTION is not required. WORKING-STORAGE SECTION is required. The length of the Working storage plus the length of the Task Global Table (TGT) should hot exceed 64K bytes. LINKAGE section is optional depending on the application.

In the PROCEDURE DIVISION following COBOL statements like ACCEPT, CURRENT-DATE, DATE, DAY, DISPLAY, EXHIBIT, RUN, TRACE, OPEN, CLOSE, WRITE, DELETE, etc., which triggers the Operating system Supervisor calls should not be used. But there are equivalent commands in CICS, which can be freely used. A CICS application should end with a CICS RETURN command or a GO BACK statement.

Command Language Translator

The CICS commands are not legal statements, which the host language compiler can recognize. This makes it necessary to translate all the CICS commands into equivalent host language statements before compilation. This job of converting the CICS commands into the host language statements is called translation and is done by a CICS Language translator. There are separate command translators one each for COBOL Assembler and PL/I.

For a program, which does not contain any CICS commands, the compiler directly compiles the source code into the object module, which is then link-edited, thus creating the load module of the program. But in the case of CICS applications the translator first translates or converts the CICS commands of the source codes into legal statements of the host language. What the translator actually does is that it commands all the CICS commands and replaces them with equivalent COBOL CALL statements. The translator also inserts necessary variables and statements in the application program for CICS housekeeping purposes. Using this translated output, the compiler compiles the program producing the object module. This object module I then link-edited creating the load module of the program. The process is shown in the following figure. The left side of the figure shows how BMS macro instructions are processed by the assembler to produce an object module (the physical map) and the symbolic map. The physical map is then processed by the linkage editor to produce load module to be used at CICS execution time. The right side of the figure gives how the command level COBOL program is prepared.

Preparation of a CICS Application Program

Preparation of a CICS Application Program

Execution of a CICS Application Program

In order to execute a CICS application program, the following procedure has to be followed. First translate, compile and link-edit the source code to obtain a load module and place this load module in the CICS application program library (LOADLIB). Define the transaction identifier into the PCT with the associated program name using DFHPCT macro. Define the program to the PPT using the DFHPPT. Sign on to CICS. Enter the transaction identifier and your program will be initiated.

Some other pre-requisites are that the terminal must be registered in the TCT, the user must be defined in the SNT and other necessary CICS tables like FCT, JCT, DCT, etc., must be prepared for the application program.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

IBM Mainframe Topics