The main configuration file for translation is config-cobol. It references other additional configuration files including:
• post-translation-file used when there is a need to performsome specific transformations. This file is to write manually.
• rdbms-conversion-file used when migrating DB2 to an Oracle database. This file is generated by the Oracle Tuxedo Application Rehosting Workbench DB2 to Oracle Converter.
• Listing 6‑1 config-cobol fileListing 6‑2 Sample keywords fileThe tr-hexa.map file is a mapping table between EBCDIC (z/OS code set) and ASCII (Linux/UNIX code set) hexadecimal values.Listing 6‑3 Hexadecimal code translationListing 6‑4 Sample of tr-hexa.mapThe rename-call-map-file is a mapping file between the old call name and the new one.It is used by some translation rules like Tr-Rename-External-Call and allows the user to make specific changes if needed.Place the following entry in the main configuration file config-cobol:Listing 6‑5 Example rename-call-map-fileThe distinction between programs (Batch and CICS) and sub-programs is mandatory; the option -cobol-type takes the following values:
• Batch programs: batch
• CICS programs: tpr
• Sub-programs: sub
Table 6‑1 Conversion variables The Cobol Converter knows which are the batch programs to be translated from the system description file which describes all components. Where version is the release version, for example M2_L5_7
• To translate one program, for example the CICS program PGMM002.cbl, invoke the command:The log file is generated in the directory from where the command line is executed. If you want to have logs in a specific directory or file use -log-file-base followed by the path and name of the file to store the execution logs.In this example, the logs file will be generated in $LOGS/trans-cbl/translate-cobol-datetime. The logs directory should be previously created.Reconciliation of copybooks can be executed implicitly by the Cobol Converter or can be performed separately (through usage of the dcrp option, see Configuring config-cobol) after allListing 6‑6 Copy reconciliation
Table 6‑2 Compilation variables Listing 6‑7 Compilation options exampleListing 6‑8 Compilation example
• Update the version.mk configuration file according to your project properties and organization.Before using the make commands, the user should check the values in the version.mk supplied with the Simple Application:Listing 6‑9 version.mk exampleAdd the missing configuration file or disable the line in the main configuration file if the file requested (in this example, tr-hexa.map) is unnecessary.Either the programs is not catalogued yet or the .pob file was wrongly deleted. Recatalog to generate the requested file.