cicstran - translates source code
The command language translator converts source code that is written in a supported language to an equivalent source program in which each CICS® command has been converted into a statement for the supporting language.
Syntax
Syntax on CICS on Open Systems
cicstran [-l {COBOL | IBMCOB | COBOLIT | C | IBMCPP} | CPP}] [-q] [-s] [-e] [-c number] [-v] [-d] [-g locale] file
Syntax on CICS for Windows
cicstran [-l {COBOL | IBMCOB | COBOLIT | C | IBMC | CPP | IBMCPP} [-q] [-s] [-e][-c number] [-v] [-d] [-g locale] file
Description
To translate EXEC CICS commands, DFHRESP macros, and DFHVALUE macros within an application program into source language statements that interface with the CICS runtime environment, invoke the CICS command language translator cicstran from an operating system shell. A C application source file of the name file.ccs produces a C source file in the current working directory with the name file.c. A C++ application source file of the name file.ccs produces a C++ source file in the current working directory with the name File.C. A COBOL source file is produced in the current working directory, with the name file.cbl from an application source file of the name file.ccp. Errors, warnings, and information messages are written to the operating system file stream stderr.
If one of the COBOL divisions of CICS COBOL program is kept within a copy book, cicstcl and cicstran will fail to process that file. In this case, use IBM® COBOL version 2.0.0.1 or later to preprocess a CICS application, as shown in the Examples section.
You must invoke the translator process before the compilation and link-edit steps when generating program-executable code.
You specify options for the command language translation process on the command-line.
For important information about permissions, see Access permissions for maps and transaction programs.
Help information is available when an invalid flag or -? is specified.
Options
- -c 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 -v and -s 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. Note: This option is null when it is not used with the -v or -s flags.
- -e
- Indicates that CEDF is to be used to debug the program. Note: If you use this option, the program’s performance might be degraded because of the extra activity that is required in order to determine the EDF status of the terminal on every EXEC CICS call.
- -d
- Produces code that passes, through CICS, line numbers that are to be used by the Execution Diagnostic Facility (CEDF) and to be included in Transaction Dump information.
- -g locale
- Sets the locale in which the translator is to work, where locale is a string that provides information to specific set conventions in the locale category.
- file
- Name of application source file.
- -l
- Identifies the source language of the program input to the translator:
CICS on Open Systems
‘C’ for C, ‘IBMCPP’ or ‘CPP’ for C++ ‘COBOL’ for Micro Focus COBOL, 'COBOLIT' for COBOL-IT, ‘IBMCOB' for IBM COBOL (the default is COBOL).
CICS for Windows
‘C’ for Microsoft C, ‘IBMC’ for IBM C, ‘CPP’ for Microsoft C++, ‘IBMCPP’ for IBM C++, ,‘COBOL’ for Micro Focus COBOL, 'COBOLIT' for COBOL-IT, ‘IBMCOB' for IBM COBOL
- -q
- Identifies COBOL string literal delimiter; APOST (default) or QUOTE.
- -s
- Produces a listing file file.lis.
- -v
- Produces a cross-reference listing of all EXEC CICS commands in file.xrf.
Restrictions
Standard operating system access permissions for files and directories apply.
Examples
- To translate a C program
to utilize CEDF, and produce a cross-reference listing:
cicstran -v -l C -e -c 60 Applic2.ccs - If one of the COBOL divisions of CICS COBOL program is kept within a copy book,
cicstcl and cicstran will fail to process that
file. In order to deal with this error, use IBM COBOL Version 2.0.0.1 or later, and perform the following steps before
running cicsctl or cicstran.
cp Applic3.ccp tApplic3.cbl cob2 -c -qMDeck(NOCompile) tApplic3.cbl cp tApplic3.dek Applic3.ccp
The interaction between the command level translator and the application programmer is through a set of error codes and conditions output by the translator. These codes are dependent on whether you invoke the translator for COBOL or C.
The translator highlights, on an error report, all EXEC CICScommands that are found to be in error.
The EIBLABEL field, used only for COBOL programs, is used to contain values that relate to handled conditions or abends. The values are:
- -1
- RETURN or XCTL
- 0
- Normal sequential command processing.
- 1
- abend
- 2 to nn
- A value that identifies a label for a handled condition or abend.
Returned Values
cicstran has the following exit values:
- 0
- cicstran has successfully translated the application program and has generated a .c or .cbl file.
- 1
- cicstran has detected errors or warnings during translation of the application program, and has written messages to the operating system file stream stderr. cicstran has generated a .c or .cbl file.
- 2
- cicstran has detected translator errors and has written messages to the operating system file stream stderr.
See Translating, compiling, and link-editing CICS application programs .