Table of Contents Previous Next PDF


CICS Runtime Preprocessor

CICS Runtime Preprocessor
This chapter contains the following sections:
Overview
The CICS Runtime Preprocessor prepares COBOL and C programs to execute under <Default ? Font>Oracle Tuxedo Application Runtime for CICS.
prepro-cics.pl
Pre-Requisites
The programs handled by the CICS preprocessor must respect the following conditions, or else run the risk of producing errors at compile- or -run-time.
Note:
1.
CICS Runtime must be installed. Some technical copy files used by prepro-cics.pl are delivered under cpylib CICS Runtime module.
2.
The environment variable COBCPY, which indicates to the Micro Focus COBOL Compiler-or COBOL-IT compiler where copybooks are stored, must be correctly set to include CICS Runtime copy files (cpylib) during compilation time.
3.
KIX--INDICS and KIX--ALL-ARGS, always;
KIX--DFHRESP, always;
KIX--DFHVALUE, if the DFHVALUE pseudo-function is used in the program or one of the copy files it includes;
4.
5.
The program must take exactly two parameters, DFHEIBLK (defined by the copy file of the same name) and DFHCOMMAREA, defined as suitable for the application PROCEDURE DIVISION. In other words, the program must look like this:
LINKAGE SECTION.
COPY DFHEIBLK.
01 DFHCOMMAREA.
....
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA.
The case of programs compiled with the NOLINKAGE option of the IBM CICS preprocessor is not (yet) supported by ART and the CICS Runtime preprocessor.
Name
prepro-cics.pl — A function that reads a COBOL program file from standard input, and outputs it with CICS instructions translated on standard output.
Synopsis
prepro-cics.pl [-type_output <output type>] [-notrec <notrec behavior>] [-B]
Description
prepro-cics.pl takes a COBOL program as input, reads it line by line, and output a file with CICS instructions translated.
prepro-cics.pl performs only one pass and processes lines one by one. That is, it reads a line from the standard input, outputs one or several lines (it may output none depending on the output type), and then reads the next input line. This behavior enables it to be compatible for use as a preprocessor inside a compiler, but prohibits using the same file as input and output. Note that it will output lines at the end of the input file.
The preprocessor expects the input COBOL program to have a 6-column left-margin. The output is in fixed format, or an error message should appear.
Options
B
B indicates that the source is an EXCI program.
MQ_wrapper
MQ_wrapper helps you migrate WebSphere MQ programs from mainframe to ART for CICS smoothly. On mainframe, programs explicitly do MQOPEN and MQCLOSE while mainframe implicitly does MQCONN and MQDISC. ART for CICS supports this way by enabling MQ_wrapper. ART for CICS can translate WebSphere MQ four APIs (MQCONN/MQOPEN/MQCLOSE/MQDISC) to its internal MQ API wrappers. Enabling MQ_wrapper allows you to
Implicitly call MQCLOSE and MQDISC when an application transaction ABEND due to ERROR condition
You should use -m queue_manager_name to specify the WebSphere MQ queue manager to be used by ART for CICS implicit MQ operation. For more information, see WebSphere MQ Queue Manager Name.
If you do not specify MQ_wrapper, programs need to explicitly do all of the four APIs (MQCONN/MQOPEN/MQCLOSE/MQDISC) to operate MQ.
For more information, see Implementing Integration with WebSphere MQ.
notrec
notrec specifies the way instructions that are not fully supported are processed. (Some options of the instruction are not recognized, hence the "notrec"). There are two possibilities:
In both cases, a message is displayed on the error output.
tsam
tsam determines whether the feature "TSAM call path for CICS and DB" is supported; recognized values are:
1 (default)
Supports tsam.
0
Does not support tsam.
type_output
type_output determines the way that output is printed; recognized values are:
debug
Prints every line with its status (untouched, modified, deleted, created). Always outputs at least one line for every line read.
orig
Prints every line, deleted lines are printed as comments. Always outputs at least one line for every line read.
normal (default)
Prints every line, except deleted ones. Does not always output at least one line for every line read.
Any other value will be considered as "normal".
Restrictions
The two words EXEC and CICS must be on the same line for a CICS instruction to be recognized.
In order to support the feature “TSAM call path for CICS and DB”, the preprocessor is asked to be executed ahead of “procob” (for Oracle DB) or “db2 prep” (for IBM UDB) commands when compiling CICS programs containing “EXEC SQL” statements.
Error Messages
Invalid CICS Messages
Error messages printed whenever an Invalid CICS instruction is found use the following format:
Summaries may be:
Instruction invalid (IGNORE and HANDLE instructions),
IGNORE and HANDLE instructions messages are quite straightforward:
IGNORE should be constructed with CONDITION.
When no rules match a CICS instruction, the error message explains, for all commands starting by the same keyword, why this command does not fit.
<command> expects one of <keyword list>, but none is present.
<command> expects <keyword>, but couldn't find it.
<command> does not know about <keyword>.
In <command>, <keyword> expects either: … <keyword> (one of <keyword list>), … but none of them was found.
In <command>, <keyword> is present and not <keyword> even if they must be used at the same time.
In <command>, <keyword> and <keyword> cannot be used at the same time.
Default value of <keyword> is supposed to be computed with value of <keyword>, but its value (<value>) is not a charstring.
If several commands match, the preprocessor lists them all. This will not actually happen, as the preprocessor checks the commands for ambiguity before translation.
Non Supported Error Messages
If a CICS instruction is unknown, or registered as "non supported", or "obsolete", an error message:
Instruction non supported
is generated.
The same error message is printed if there are some non-recognized keywords in an instruction, when the option notrec is set with value stop.
prepro-cics-C.pl
Pre-Requisites
The programs handled by the CICS preprocessor must respect the following conditions, or else run the risk of producing errors at compile or Runtime.
1.
CICS Runtime must be installed. Some technical header files used by prepro-cics-C.pl are delivered under include directory in CICS Runtime module.
2.
prepro-cics-C.pl does not support "TSAM call path for CICS and DB" functions.
3.
If the program contains "EXEC SQL" statements, the preprocessor is asked to be executed ahead of db pre-complier commands (db2 prep for IBM UDB or pro*C for Oracle DB).
Name
prepro-cics-C.pl — A function that reads a C program file specified by source_file, and outputs the C program file with CICS instructions translated on output file.
Synopsis
prepro-cics-C.pl [-help] [-source_format <fixed>] [-o <output file name>] [-B] [-enable_pragma] source_file
Description
prepro-cics-C.pl takes a C program as input, reads it line by line, and outputs a file with CICS instructions translated.
prepro-cics-C.pl performs only one pass and processes lines one by one. That is, it reads a line from source_file, outputs one or several lines, and then reads the next input line. This behavior enables it to be compatible for use as a preprocessor inside a compiler, but prohibits using the same file as input and output.
Options
-help
help shows the usage of prepro-cics-C.pl.
-source_format
source_format specifies the source format of C program. There are two possibilities:
fixed - (default) means that each line of a C program should be in fixed format.
free - specifies free style of C program.
Note:
Only fixed format is supported currently.
-o
o specifies output file name and path.
-B
B specifies that the source is an EXCI program.
-enable_pragma
enable_pragma specifies to enable pragma.
source_file
source_file specifies input file name and path.
Restrictions
/**/ is used for single line comments. Do not put a comment in the middle of an EXEC CICS command.
Keep EXEC CICS as a whole in one line.
#pragma will be automatically translated to comments.
Keep C main() function, its parameter list, and parenthesis in one line. For example,
void main(int argc, char **argv)
Error Messages
prepro-cics-C.pl may print the following error messages:
Cannot open source_file
PROGRAM should be constructed with EXCI LINK
LENGTH should be constructed with COMMAREA in EXCI LINK
DATALENGTH should be constructed with COMMAREA in EXCI LINK
RETCODE should be constructed with EXCI LINK
Instruction rulename non supported
Instruction rulename is obsolete

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.