Working with Micro Focus CICS Integrated pre-processor

To translate EXEC CICS commands, DFHRESP macros, and DFHVALUE macros within an application program into source language statements, TXSeries provides CICS translator command cicstran . To generate CICS program-executable code, it involves two separate steps. First step is to invoke the translator and followed by compilation and link-edit. If you are using EXC CICS commands in COBOL COPYBOOK, translation of COPYBOOK using cicstran must be done separately.

TXSeries supports integrated pre-processor option for translating EXEC CICS command and this feature can be used to compile CICS COBOL applications using Micro Focus Visual COBOL compiler command. If you are using CICS integrated pre-processor, separate translation of COPYBOOK with EXEC CICS COMMAND is not needed. The debuggings of CICS program modules generate using integrate pre-processor provides better debugging experience by displaying EXEC CICS commands on animator screen.

To use CICS integrated pre-processor with Micro Visual COBOL, use PREPROCESS compiler directive option by specifying pre-processor name as cicsppmf .

To compile CICS COBOL application using integrated pre-processor with Micro Focus COBOL compile, follow the instructions:

  1. Ensure that the following prerequisites are in place:
    • CICSPATH is set to the TXSeries install directory in your current shell.
    • All TXSeries commands used are located in the bin directory of CICSPATH. The PATH must contain CICSPATH/bin directory.
  2. Set COBCPY environmentvariable to include CICSPATH/include directory and COBPATH environment variableto include CICSPATH/bin/ directory on shell where you want to compile and generate load modules.

    # export COBCPY=$COBCPY:$CICSPATH/include

    # export COBPATH=$COBPATH:$CICSPATH/bin

  3. Run the Micro Focus Visual COBOL compiler command cob, by specifying -pre-process compiler directive options by specifying CICS pre-processor module cicsppmf in the following format

    -preprocess(cicsppmf) cics-pre-processor-options endp

    Here cicsppmf is the CICS pre-processor module name and cics-pre-processor-options are the pre-processor options supported by TXSeries. The details on supported pre-process options mentioned in CICS Integrate pre-processor options for Micro Focus Visual COBOL

Examples:

  1. To compile a CICS COBOL program program.cbl.
    # cob -F -ug -C "-preprocess(cicsppmf) endp" -C DATA-CONTEXT -C CALL-RECOVERY program.cbl 
  2. To compile a program to use EDF option for CICS pre-processor (EDF indicates that CEDF can be used to debug the program) , specify edf option as CICS pre-processor option displayed
    # cob -F -ug -C "-preprocess(cicsppmf) edf endp" -C DATA-CONTEXT -C CALL-RECOVERY program.cbl 
  3. To compile a program on a locale specific locale , for example, en_US , specify CICS pre-processor option LOCALE as en_US as displayed.
    # cob -F -ug -C "-preprocess(cicsppmf) LOCALE==en_US edf endp" -C DATA-CONTEXT -C CALL-RECOVERY program.cbl 

CICS Integrate pre-processor options for Micro Focus Visual COBOL

EDF
Indicates that CEDF is to be used to debug the program and the option is equivalent to -e option of cicstran.
DEBUG
Produces code that passes, through CICS, line numbers that are to be used by the Execution Diagnostic Facility (CEDF). This option is equivalent to -d option of cicstran command.
LIST
Produces a listing file file.lis . This option is equivalent to -s option of cicstran command.
LOCALE locale
Sets the locale in which the CICS pre-processor is to work, where locale is a string that provides information to specific set conventions in the locale category. This option is equivalent to -l option of cicstran command.
LINES number
Specifies the number of lines, including heading and blank lines, that are to be included in each page of the translator listing of the output file that is created with the XRF and LIST flags. number must be an integer in the range 7 through 255. If 7 or less, the heading and one line of listing is included on each page. The default is 60. This option is equivalent to -n option of cicstran command.
XRF
Produces a cross-reference listing of all EXEC CICS commands in file.xrf. This option is equivalent to -v option of cicstran command.
NL
To pre-process program to use CICS NOLINKAGE option. This option is equivalent to -n option of cicstran command

To use multiple pre-processor along with CICS pre-processor

CICS pre-process option can be used along with Db2 pre-process options or any other supported pre-processor directives of Micro Focus. If you have multiple pre-processors, CICS pre-process can be specified on any order. To compile CICS Db2 application, you can specify either Db2 pre-processor compiler directive first and followed by TXSeries pre-processor compiler directive options or vice versa.

Example: to compile CICS Db2 program hello.cbl
# cob -ug hello.cbl assign=external -C "DB2(ACCESS DB==DBNAME COLLECTION==USER.COLL) -
preprocess(cicsppmf) edf endp)" -C "list()" -C DATA-CONTEXT -C CALL-RECOVERY