Several configuration files need to be set, see Description of the configuration files, before launching the conversion process.The different objects generated are described in Description of the output files. Some objects are only generated when migrating VSAM files to Oracle tables (PCO programs, SQL files, relational module, logical module, utilities and configuration files for JCL and COBOL conversion).
• Description of the output files including the Generated objects.
• Detailed Processing including the Command-line syntax.
Table 4‑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).For each candidate file for migration, its structure should be described in Cobol format. This description is used in a Cobol copy by the Rehosting Workbench Cobol converter, subject to the limitations described in COBOL description.Any redefinition inside a COBOL description lacking discrimination rules presents a major risk during the file transcoding. Therefore, any non-equivalent redefined field requests a discrimination rule. On the other hand, any equivalent redefinition (called technical redefinition) must be subject to a cleansing within the COBOL description (see the example below COBOL description format).The discrimination rules are provided in the mapper file. The syntax is described in chapter Mapper file of this document.
Table 4‑2 Picture clause reengineering If the parameter file:char_limit_until_varchar is set in the db-param.cfg file, it takes precedence over the above rule.Listing 4‑1 db-param.cfg template
Table 4‑3 db-param.cfg parameters
• For a field size > 2000 it is migrated in VARCHAR2, except if the parameter file:char_limit_until_varchar is used.If the parameter contains: file:char_limit_until_varchar:29 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.Listing 4‑2 file-template.txtWhen required, another version of the file-template.txt file can be placed in the $PARAM/file directory. The use of an alternative file is signaled during the execution of file.sh by the message:Listing 4‑3 Execution log with alternative template fileThis file is placed during the installation of the Rehosting Workbench, it controls the transfer of components generated in the different installation directories. This file indicates the location of each component to copy during the installation phase of file.sh, when launched using file.sh -i.The Datamap file must be created in the directory: $PARAM/file with the complete name:Where <configuration name> is the name of the current configuration used.Listing 4‑5 Datamap file
is-gdg limit <p> [scratch/noscratch] [empty/noempty]
• p parameter value is used to specify the total number of generations that the GDG may contain.
• scratch/noscratch parameters are mutually exclusive. Scratch parameter specifies that whenever an entry of the GDG is removed from the index, it should be deleted physically and uncataloged. Noscratch parameter specifies that whenever an entry of the GDG is removed from the index, it should be uncataloged but not physically deleted.
• empty/noempty parameters are mutually exclusive. Empty specifies that all existing generations of the GDG are to be uncataloged whenever the generations of GDG reaches the maximum limit . Noempty specifies that only the oldest generation of the GDG is to be uncataloged if the limit is reached. For indexed files, this clause is used to describe the key; where <n> is the start position and <m> is the length of the key. For relative files, this clause is used to describe the key, where <m> is the length of the key. Listing 4‑6 Datamap exampleEach z/OS file listed in the Datamap file, must be described in the mapper file.Listing 4‑7 Mapper file clause structure
Table 4‑4 Mapper file parameters
• record name: corresponds to the level 01 field name of the copy description.
• path/COPY name: corresponds to the access path and name of the descriptive copy of the file to migrate.
• record name: corresponds to the level 01 field name of the copy description of the file to migrate.
• path/COPY name: corresponds to the access path and name of the descriptive copy of the file to migrate.
Table 4‑5 Mapper file attributes Listing 4‑8 Mapper file exampleIn this example the mapper file is named STFILEORA. The file processes only one file named PJ01AAA.SS.VSAM.CUSTOMER that is migrated to an Oracle table using the convert option. The ODCSF0B.cpy copy file used to describe the file is one of the source copy files.
•
•
Table 4‑6 Mapping strategies When discarding subfields at the level NIV1, the Rehosting Workbench File Convertor only processes the field NIV1 PIC 9(5). When not discarding subfields, the NIV1 field is ignored and the two fields NIV2A and NIV2B are processed.Listing 4‑10 Mapper file for the file: PJ01AAA.SS.VSAM.CUSTOMERListing 4‑13 Mapper file for the file: PJ01AAA.SS.VSAM.CUSTOMERListing 4‑16 Mapper file for the file: PJ01AAA.SS.VSAM.CUSTOMER
Table 4‑7 Discrimination rules In the following example the fields DPODP-DMDCHQ, DPONO-PRDTIV, DP5CP-VALZONNUM are redefined.Listing 4‑18 Discrimination rule COBOL descriptionListing 4‑19 Discrimination rulesThe first rule is to test the value of the numeric field DPODP-RDCRPHY.The second rule tests the first two characters of an alphanumeric field DPONO-NPDT. Only the values 01 and 02 are allowed.The third rule tests whether the field DPODP-RDCRPHY is numeric.Once 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 COBOL description), then it is the location of the copy book that is directly used.This file is created during cataloging, it must be up-to-date and present so that File Convertor can migrate DB2 objects to Oracle. See The Cataloger Symtab and other miscellaneous files.
Note: The unloading and loading components generated with the -i $HOME/trf option are placed in the following locations:
Table 4‑8 Component locations $HOME/trf/unload/file/<configuration name> <file name>.jclunload $HOME/trf/reload/file/<configuration name> Location by <configuration name> of the SQL scripts used to create the Oracle objects.
Note: <target table name> Is the file name on the target platform; this file name is furnished in the mapper file.The JCL used to unload the files are generated using the -g option of the file.sh command. They are then (using the -i option) installed in:
The JCLs are named: <file name>.jclunload
Note: The .jclunload extension should be deleted for execution under z/OS.
• JOB cards: <crdjob>,
• Listing 4‑20 Unload JCL exampleThe COBOL transcoding programs are generated using the -g option of the file.sh command. They are then (using the -i option) installed in:The programs are named: RELFILE_<logical file name>.cblThe programs should be compiled using the Microfocus COBOL compilation options documented in Compiler options.Listing 4‑21 FILE CONTROL section - for transcoding programsThe COBOL transcoding programs are generated using the -g option of the file.sh command. They are then (using the -i option) installed in:The programs are named: RELTABLE_<logical file name>.cblThe programs should be compiled using the Microfocus COBOL compilation options documented in Compiler options.Listing 4‑22 FILE CONTROL section - for transcoding programs
Note: The do_commit module is part of Oracle Tuxedo Application Runtime Batch.The Reloading Korn shell scripts are generated using the -g option of the file.sh command. They are then (using the -i option) installed in:The scripts are named: loadfile-<logical file name>.kshThe execution of the scripts produces an execution log in $MT_LOG/<logical file name>.logListing 4‑23 Reloading file script variablesVarious messages may be generated during the execution phases of the scripts, these messages are explained in Oracle Tuxedo Application Rehosting Workbench Messages.The scripts are named: loadtable-<logical file name>.kshThe execution of the scripts produces an execution log in $MT_LOG/<logical file name>.logListing 4‑24 Reloading table script variablesVarious messages may be generated during the three execution phases of the scripts; explanations of these messages are listed in Oracle Tuxedo Application Rehosting Workbench Messages.Oracle objects are created under SQLPLUS using: ${DDL}/STFILEORA/ODCSF0B.sqlThe ORACLE DDL is generated using the -g option of the file.sh command. They are then (using the -i option) installed in:They are named: <target file name>.ddl.
Constraint name of primary key (PK_<Oracle table name>Listing 4‑25 DDL generation sql exampleThese access functions are generated using the -g option of file.sh and installed in$HOME/trf/DML using the -i and -s options..
Table 4‑9 Access functions The RM_<logical file name>.pco and ASG_<logical file name>.cbl access functions use the following variables:
Table 4‑10 Access call implemented variables Indicates the type of operation to execute, for example OPEN, WRITE, etc. The code is passed using the FILE-CODE-F variable of the MWFITECH copy file. A file can be opened in different modes: INPUT, OUTPUT, I O, EXTEND. The mode is passed using the FILE-OPEN-MODE variable of the MWFITECH copy file. The name of the secondary key is passed using the FILE-ALT-KEY-NAME variable of the MWFITECH copy file. For a relative file, the value of the relative key is passed to or from the access module using the FILE-REL-KEY variable of the MWFITECH copy file.Listing 4‑26 LINKAGE SECTION structureFor all OPEN operations, the FILE-CODE-F variable should contain the key-word OPEN.The FILE-OPEN-MODE variable should contain the type of OPEN to perform as follows:.
Table 4‑11 Call argument file open modes For CLOSE operations, the FILE-CODE-F variable should contain the key-word CLOSE.For CLOSE LOCK operations, the FILE-CODE-F variable should contain the key-word CLOSE-LOCK.
Table 4‑12 Call argument delete modes
Table 4‑13 Read operation values depending on arguments READ filename1 [NEXT] READ-NEXT => FILE-CODE-F READ filename1 READ-KEY => FILE-CODE-F READ filename1 NEXT READ-NEXT => FILE-CODE-F READ filename1 READ-KEY => FILE-CODE-F READ filename1 PREVIOUS READ-PREV => FILE-CODE-F If DataName1 is a variable corresponding to the keyAltKey1 READ filename1 KEY DataName1 READ filename1
REWRITE RecName1 REWRITE-CUR => FILE-CODE-F REWRITE RecName1 REWRITE-KEY => FILE-CODE-F
START file1 START-EQUAL => FILE-CODE-F START file1 KEY {EQUAL| = |EQUALS} DataName1 START-EQUAL => FILE-CODE-F START file1 KEY {EXCEEDS| > |GREATER} DataName1 START-SUP => FILE-CODE-F START file1 KEY {NOT LESS |GREATER OR EQUAL | NOT < | >= } DataName1 START-SUPEQ => FILE-CODE-F START file1 KEY {< |LESS} DataName1 START-INF => FILE-CODE-F START file1 KEY {NOT GREATER |LESS OR EQUAL | NOT > | <= } DataName1 START-INFEQ => FILE-CODE-F AltKey1 => FILE-ALT-KEY-NAMESTART-ALT-EQUAL => FILE-CODE-F START file1 KEY {EXCEEDS| > |GREATER} DataName1 AltKey1 => FILE-ALT-KEY-NAMESTART-ALT-SUP => FILE-CODE-F START file1 KEY {NOT LESS| GREATER OR EQUAL | NOT < | >=} DataName1 AltKey1 => FILE-ALT-KEY-NAMESTART-ALT-SUPEQ => FILE-CODE-F {< |LESS} DataName1 AltKey1 => FILE-ALT-KEY-NAMESTART-ALT-INF => FILE-CODE-F START file1 KEY {NOT GREATER |LESS OR EQUAL | NOT > | <= } DataName1 AltKey1 => FILE-ALT-KEY-NAMESTART-ALT-INFEQ => FILE-CODE-F
The following copy files are used by certain access functions. They should be placed in the directory: < installation platform>/fixed-copy/ during the installation of the Rehosting Workbench:These KSH scripts are generated using the -g option of file.sh and then installed in $HOME/trf/SQL/file/<configuration name> using the -i option. When necessary, they are used by Oracle Tuxedo Application Runtime Batch.
Table 4‑17 Korn shell utilities The desc.vsam and envfile_tux files are generated in the $HOME/trf/config/tux/ directory when VSAM files are migrated to Oracle tables. They are used by Oracle Tuxedo Application Runtime CICS.This file is used by the Rehosting Workbench Cobol Converter and JCL Converter to rename object names.Table 4‑18 Conversion file names
These files are created when VSAM files are converted to Oracle tables. They are used by Oracle Tuxedo Application Runtime Batch to bridge the technical differences between the z/OS file on the source platform and the corresponding Oracle table on the target platform.The files are generated in: $HOME/trf/dataThey are named: <source platform physical file name>.rdb${DATA}/<source platform physical file name> <max> <org> <form> UL_<logical file name> <asgn_in> DL_<logical file name> <asgn_out> RM_<logical file name> <target table name> ${DDL}/<configuration name/cleantable-<target table name>.ksh ${DDL}/<configuration name>/droptable-<target table name>.ksh ${DDL}/<configuration name>/createtable-<target table name>.ksh ${DDL}/<configuration name>/ifemptytable-<target table name>.ksh ${DDL}/<configuration name>/ifexisttable-<target table name>.ksh
Table 4‑19 .rdb file parameters <source platform physical file name> UL_<logical file name> Uploading component name used by Oracle Tuxedo Application Runtime Batch. DL_<logical file name> RM_<logical file name> <target table name> ${DDL}/<configuration name/cleantable-<target table name>.ksh ${DDL}/<configuration name/droptable-<target table name>.ksh ${DDL}/<configuration name>/createtable-<target table name>.ksh ${DDL}/<configuration name>/ifemptytable-<target table name>.ksh ${DDL}/<configuration name>/ifexisttable-<target table name>.ksh
• n: offset of the indexed key (in COBOL description).
• m: length of the indexed key (in COBOL description).
• m: length of the relative key (in COBOL description).The following example is generated when migrating an indexed VSAM file to an Oracle table. On the source platform, the VSAM file is named: PJ01AAA.SS.VSAM.CUSTOMERListing 4‑27 .rdb indexed VSAM examplefile.sh creates different execution reports depending on the options chosen. In the following examples the following command is used:Copied <Templates>:../../Conv-ctrl-STFILEORA to /home2/wkb9/param/dynamic-config/Conv-ctrl-STFILEORAThis section describes the Command-line syntax used by the File Convertor, and the Process Steps summary.file.sh - generate file migration components.file.sh generates the Rehosting Workbench components used to migrate z/OS files to UNIX Micro Focus files and Oracle databases.Makes the generated SHELL scripts executable. COBOL programs are adapted to Micro Focus COBOL fixed format. When present, the shell script described in File modifying generated components is executed.Places the components in the installation directory. This operation uses the information located in the file_move_assignation.txt file.If the file.sh options are used one at a time, they should be used in the following order:
1.
2.
3. 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 out put files).The components used for the reloading (generated in $HOME/trf/reload/file) should be installed on the target platform.
Table 4‑20 Target platform environment variables The location of the generic reload and control scripts ($HOME/trf/reload/bin). ($HOME/trf/SQL/file/<configuration name>). Compiling these programs requires the presence of a copy of CONVERTMW.cpy adapted to the project.These unloading JCLs are named <logical filename>.jclunloadThe files transferred to the target UNIX/Linux platform should be stored in the $DATA_SOURCE directory.
Note: The loadgdg-<logical file name>.ksh script enables the execution of the different loadgds-<logical file name>.ksh scripts. Each loadgds script is used to reload one unitary generation of the file (each data set within a GDG is called a generation or a Generation Data Set – GDS).loadfile or loadtable transcode and reload data to either file or table.loadgdg and loadgds transcode and reload data to file.This check uses the following option of the loadfile-<logical file name>.ksh or loadtable-<logical file name>.ksh