![]() |
![]() |
![]() |
![]() |
![]() |
• Description of the Output Files including the Generated Objects.
• Detailed Processing including the Command-Line Syntax.When migrating files from a z/OS source platform to a target platform, the first question to ask, when VSAM is concerned, is whether to keep a file or migrate the data to an Db2/luw (udb) table.KSDS, RRDS and ESDS VSAM files can be migrated into Db2/luw (udb) tables.To make this work, the first task is to list all of the VSAM files to be migrated, and then identify those files that should be converted to Db2/luw (udb) tables. For example, permanent files to be later used via Oracle or files that needs locking at the record level.
• Each table name is stipulated in the mapper-<configuration name>.re file using the table name clause.
• For sequential VSAM files (VSAM ESDS): Tuxedo ART Workbench adds a technical column: *_SEQ_NUM NUMERIC.
•
• For indexed VSAM files (VSAM KSDS): Tuxedo ART Workbench does not add a technical column unless duplicate keys are accepted; the primary key of the VSAM file becomes the primary key of the table.
Table 8‑1 Picture Clause Re-engineering Becomes CHAR if length <= 255Becomes VARCHAR if length > 255 and <= 4000If the parameter file:char_limit_until_varchar is set in the db-param.cfg file, it takes precedence over the above rule.This file should be created in the directory indicated by the $PARAM directory:Listing 8‑1 db-param.cfg Template
Table 8‑2 db-param.cfg Parameters Default value is “cobol_mf” for Micro Focus COBOL. Specifies a mapping table file between EBCDIC (z/OS code set) and ASCII (Linux/UNIX code set) hexadecimal values; if hexa-map-file is not specified, a warning will be logged.
• For a field size > 255 it is migrated in VARCHAR, 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 8‑2 file-template-db2luw.txtWhen required, another version of the file-template-db2luw.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 8‑3 Execution Log with Alternative Template FileThis file is placed during the installation of Tuxedo ART 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.
Note: In the mapper file, the converted clause has to be used for RDBMS Table target.
Indicates file is to be converted to Db2/luw (udb) table (converted clause can be combined with transferred clause) Indicates that the file is to be loaded and reloaded (can be combined with converted clause).
• 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.
Note: “map record” and “source record” parameters must use the same “record name” and “descriptive copy”. They are used for forward compatibility.
• 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.
Note: “map record” and “source record” parameters must use the same “record name” and “descriptive copy”. They are used for forward compatibility.
Table 8‑4 Mapper File Attributes Listing 8‑5 Mapper File ExampleIn this example the mapper file is named STFILEUDB. The file processes only one file named PJ01AAA.SS.VSAM.CUSTOMER that is migrated to an Db2/luw (udb) table using the convert option. The ODCSF0B.cpy copy file used to describe the file is one of the source copy files.
•
Table 8‑5 Mapping Strategies When discarding subfields at the level NIV1, Tuxedo ART Workbench File-to-Db2/luw (udb) Converter 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 8‑10 Mapper File for the File: PJ01AAA.SS.VSAM.CUSTOMERThe table is generated as follows (only the VS_CUSTBDATE field is kept).Listing 8‑13 Mapper File for the File: PJ01AAA.SS.VSAM.CUSTOMER
Table 8‑6 Discrimination Rules In the following example the fields DPODP-DMDCHQ, DPONO-PRDTIV, DP5CP-VALZONNUM are redefined.Listing 8‑15 Discrimination Rule COBOL DescriptionListing 8‑16 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.
Note: The unloading and loading components generated with the -i $HOME/trf option are placed in the following locations:
Table 8‑7 Component Locations Location by <configuration name> of the SQL scripts used to create the Db2/luw (udb) objects. Liste of components is depending on the optional attributes clause initialized in the mapper file.
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.
•
• Listing 8‑17 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: RELTABLE-<logical file name>.sqbThe programs should be compiled using the target COBOL compilation options and db2 Precompiler options documented in Compiler Options.The compilation of these programs requires the presence of a CONVERTMW.cpy copy file adapted to the project documented in Codeset Conversion..These files read a file on input and directly load an Db2/luw (udb) table using the SQL INSERT verb.Listing 8‑18 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: loadtable-<logical file name>.kshThe execution of the scripts produces an execution log in $MT_LOG/<logical file name>.logListing 8‑19 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.Db2/luw (udb) objects are created under the db2 command using: ${DDL}/STFILEUDB/ODCSF0B.sql“runb” is a part of Oracle Tuxedo Application Runtime Batch. For more information, see see Oracle Tuxedo Application Runtime Batch Reference Guide.The Db2/luw (udb) 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>.sqlListing 8‑20 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 8‑8 Access Functions Calls all init_all_files_<configuration name>.cbl (function used by Oracle Tuxedo Application Runtime Batch). Initializes a transaction. All variables used by relational module and ASG_<logical file name> module are initialized for the configuration name listed (function used by Oracle Tuxedo Application Runtime Batch). Closes a transaction. This program closes all cursors opened in tables for the configuration listed and unlocks all files opened with logical accessor ASG_<logical file name> (function used by Oracle Tuxedo Application Runtime Batch). Calls all close_all_files_<configuration name>.cbl (function used by Oracle Tuxedo Application Runtime Batch).The RM_<logical file name>.sqb and ASG_<logical file name>.cbl access functions use the following variables
Table 8‑9 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 8‑21 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 8‑10 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 8‑11 Call Argument Delete Modes
Table 8‑12 Read Operation Values Depending on Arguments If DataName1 is a variable corresponding to the keyAltKey1
Note: If the INTO clause is found, a MOVE operation is added after the call in order to set the value of the indicated field.
Note: If the FROM clause is found, a MOVE operation is added before the call in order to set the value of the indicated field.
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 Tuxedo ART 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 8‑16 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 Db2/luw (udb) tables. They are used by Oracle Tuxedo Application Runtime CICS.This file is used by Tuxedo ART Workbench COBOL Converter and JCL Converter to rename object names.
Table 8‑17 Conversion file Names These files are created when VSAM files are converted to Db2/luw (udb) 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 Db2/luw (udb) 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 8‑18 .rdb File Parameters Uploading component name used by Oracle Tuxedo Application Runtime Batch.
• 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 Db2/luw (udb) table. On the source platform, the VSAM file is named: PJ01AAA.SS.VSAM.CUSTOMERListing 8‑22 .rdb Indexed VSAM Examplefile.sh creates different execution reports depending on the options chosen. In the following examples the following command is used:This section describes the Command-Line Syntax used by the File-to-Db2/luw (udb) Converter, and the Process Steps summary.file.sh - generate file migration components.file.sh generates Tuxedo ART Workbench components used to migrate z/OS files to Db2/luw (udb) databases.Triggers the generation, for the configuration indicated, of the unloading and loading components in $TMPPROJECT. This generation depends on the information found in the configuration files.Makes the generated SHELL scripts executable. COBOL programs are adapted to the target 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-db2luw.pgm file.All configuration files are created in $PARAM/dynamic-config and DML files in <trf>/DML directory.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 8‑19 Target Platform Environment Variables The location of the generic reload and control scripts ($HOME/trf/reload/bin). ($HOME/trf/SQL/file/<configuration name>). This UNIX/Linux variable has to contain the directory of Oracle Tuxedo Application Runtime for Batch utilities The directory where the *.rdb files are generated by workbench.When "use-file-catalog" is set in system description file, this variable is necessary.E,g., "$HOME/trf/data".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.loadtable transcode and reload data to table.This check uses the following option of the loadtable-<logical file name>.ksh