For a comprehensive view of the migration process, see Oracle Tuxedo Application Rehosting Workbench Reference Guide for the chapters Data Conversion and Cobol Conversion as well as the the Rehosting Workbench Cobol Converter chapter of this guide.
Table 3‑1 z/OS to UNIX file organizations Files that are part of a PDS are identified as such by their physical file name, for example: METAW00.NIV1.ESSAI(FIC).The migration of z/OS files to UNIX/Linux is dependant on the results of the Oracle Tuxedo Application Rehosting Workbench Cataloger. It does not have any impact on the conversion of COBOL components or the translation of JCL components.For each candidate file for migration, its structure should be described in Cobol format. This description is used in a Cobol copy by the the Rehosting Workbench Cobol converter, subject to the limitations described in COBOL description.
Listing 3‑1 Cobol COPY sampleListing 3‑2 Cobol COPY discrimination rulesListing 3‑3 Non-equivalent redefinition exampleListing 3‑4 Related discrimination rulesListing 3‑5 Technical redefinition initial situation
•
•
• For a File-to-File conversion you must create these files yourself.are automatically placed in the file structure during the installation of the Rehosting Workbench. If specific versions of these files are required for particular z/OS files they will be placed in the $PARAM/file file structure.Listing 3‑7 db-param.cfg example
Table 3‑2 Datamap parameters In the following example, the first two files are QSAM files, the organization is therefore always sequential. The PJ01AAA.SS.VSAM.CUSTOMER file is a VSAM KSDS file and the organization is therefore indexed. The parameters, keys offset 1 bytes length 6 bytes primary, describe the key. In this example, the key is six bytes long starting in position 1.Listing 3‑8 Example datamap file: Datamap-FTFIL001.re
Table 3‑3 Mapping parameters During the generation, the string #VAR:RECS-SOURCE# will be replaced by the directory name where the copy files are located: $PARAM/file/recs-sourceThe name of the copy file BCOAC01E.cpy is freely chosen by the user when creating the file. REC-ENTREE corresponds to the level 01 field name in the copy file. Listing 3‑9 Example mapper file: mapper-FTFIL001.reOnce the COBOL description files have been prepared, the copy files described in the mapper-<configuration name>.re file should be placed in the $PARAM/file/recs-source directory.If you use a COBOL copy book from the source platform to describe a file (see note in COBOL description), then it is the location of the copy book that is directly used in the mapping parameter file as in the "COPY/ODCSF0B.cpy" example above.To generate the components used to migrate z/OS files the Rehosting Workbench uses the file.sh command. This section describes the command.file.sh [ [-g] [-m] [-i <installation directory>] <configuration name> | -s <installation directory> (<configuration name>,...) ]file.sh generates the components used to migrate z/OS files using the Rehosting Workbench.Installation option. Places the components in the installation directory. This operation uses the information located in the file-move-assignation.pgm file.The unloading and loading components generated with the -i $HOME/trf option are placed in the following locations:
Table 3‑4 Location of components The generation log files Mapper-log-<configuration name> can be used to resolve problems.When present, this file will be automatically executed at the end of the generation process. It will be called using the <configuration name> as an argument.The version.mk configuration file in $PARAM is used to set the variables and parameters required by the make utility.In version.mk specify where each type of component is installed and their extensions, as well as the versions of the different tools to be used. This file also describes how the log files are organized.The following general variables should be set at the beginning of migration process in the version.mk file:
• In addition, the FILE_SCHEMAS variable is specific to file migration, it indicates the different configurations to process.The make FileConvert command can be used to launch the Rehosting Workbench File-To-File Converter. It enables the generation of the components required to migrate z/OS files to a UNIX/Linux target platform.The make file launches the file.sh tool with the -g, -m and -i options, for all configurations contained in the FILE_SCHEMAS variable.This section describes the tasks of unloading, transfer and reloading using the components generated using the Rehosting Workbench (see Generating the components).The components used for the unloading (generated in $HOME/trf/unload/file) should be installed on the source z/OS platform. The generated JCL may need adapting to specific site constraints including JOB cards, library access paths and access paths to input and output files (Data Set Name – DSN).The components used for the reloading (generated in $HOME/trf/reload/file) should be installed on the target platform (runtime).
The location of the generic reload and control scripts ($HOME/trf/reload/bin) An unloading JCL is generated for each z/OS file listed in the Datamap parameter file (Datamap-<configuration name>.re). These unloading JCLs are named <logical file name>.jclunload
Note: The .jclunload extension should be deleted for execution under z/OS.For the example provided in Mapping parameter file (mapper-<configuration name>.re), the generated programs are:For the example provided in Mapping parameter file (mapper-<configuration name>.re), the generated scripts are:By default, the input file is located in the directory indicated by $DATA_SOURCE, and the output file is placed in the directory indicated by $DATA.These files are named with the logical file name used in the Mapping parameter file (mapper-<configuration name>.re).This check uses the following option of the loadfile-<logical file name>.ksh
• If the Mapper-log-<configuration name> file contains any errors (see Common problems and solutions).When executing file.sh -gmi $HOME/trf STFILEORA the following message appears:A file to be migrated is present in the mapper-<configuration name>.re file and absent from the Datamap.<configuration name>.re file.When executing file.sh -gmi $HOME/trf STFILEORA1 the following message appears:When executing file.sh -gmi $HOME/trf STFILEORA2 the following message appears:When executing file.sh -gmi $HOME/trf STFILEORA3 the following message appears:The variable $PARAM has not been set.