OpenFrame/HiDB Migration Tools
This chapter describes migration tools supported by OpenFrame/HiDB.
1. Overview
The following is a list of tools for migrating hierarchical data from mainframes. Details about tool usage and examples are described in each section.
Program | Description |
---|---|
Extracts the segment and field data from a specific DBD of mainframe IMS database to create a layout (COBOL Copybook). |
|
Converts the EXEC DLI interface of an application into a HiDB internal interface through precompilation. |
|
Creates the data set migration schema file. |
|
Imports data in the HiDB standard format and loads it to the HiDB database. |
|
Converts the data unloaded from the mainframe into the HiDB standard format. |
|
Controls the ID mappings for a secondary index table or a logical child table. |
|
Converts the data unloaded from HiDB and passed through dsmigout to the input format of the mainframe load utility. |
2. dbdcpybkgen
The dbdcpybkgen tool creates the layout (COBOL Copybook) by extracting segment and field data from the specific DBD of Mainframe IMS DB.
When there is a variable length segment in the Index DBD or within the DBD, you must use the layout which is created from dbdcpybkgen tool.
Usage
The following is how to execute the dbdcpybkgen.
Usage: dbdcpybkgen [options] <file> ...
-
[options]
Option Description [-D]
Executes dbdcpybkgen in a DEBUG mode.
[-h]
Displays help for dbdcpybkgen.
-
Parameters
Parameter Description file
DBD script for which you want to create a layout.
Examples
The following is an example of using the dbdcpybkgen to create the layout of general DBD segments.
$ dbdcpybkgen EXHIDAM
After a successful execution of the previous command, the following messages are displayed.
dbdcpybkgen version 7.2.0(10) jjeong@:ofsrc/ims(#1) 2018-02-05 11:32:29 Database Description Block Copybook Generation Program DBDCPYBKGEN FCOUNT=1 --HiDB runs on debug mode --HiDB connection name is HIDB_NX_CONN --HiDB DLI functions show data buffer --HiDB resets application buffer if GET request fails --HiDB alters key sequences -HiDB use CONVERT('WE8EBCDIC1047', 'MSWIN949') key sequence --HiDB requests SELECT query with LEAD for GET NEXT without SSA --HiDB requests SELECT query with LEAD for GET NEXT IN PARENT without SSA --HiDB uses RDB indicator to check column status --HiDB use 0x20 to default value of fetched columns ------------------------------------------------------------ *** Processing DBD script "EXHIDAM" ------------------------------------------------------------ >>>>> Processing DBD "EXHIDAM" *** DBD information DBD NAME=EXHIDAM,ACCESS=(8,2),RMNAME=(,1,16,0) DATASET LABEL=,DD1=HIDAMD,DD2=,CISZ1=0,CISZ2=0 BLOCK=(0,0),DEVICE=3380,SCAN=0,FRSPC(0,0) SEGM NAME=SEG1,PARENT=(,(,)),SOURCE=((,),(,)) LCHILD NAME=(POINTER,EXHIIND),PAIR=,INDEX= LCHILD NAME=(POINTE1,EXHIIX1),PAIR=,INDEX= LCHILD NAME=(POINTE2,EXHIIX2),PAIR=,INDEX= LCHILD NAME=(POINTE3,EXHIIX3),PAIR=,INDEX= FIELD NAME=SEG1KEY,BYTES=6,START=1,ATTR=(SEQ,U) FIELD NAME=KOSI,BYTES=4,START=7,ATTR= XDFLD NAME=SEG1KE1,SEGMENT=SEG1 XDFLD NAME=SEG2KE2,SEGMENT=SEG2 XDFLD NAME=SEG3KE3,SEGMENT=SEG3 SEGM NAME=SEG2,PARENT=(SEG1,(,)),SOURCE=((,),(,)) LCHILD NAME=(POINTE4,EXHIIX4),PAIR=,INDEX= FIELD NAME=SEG2KEY,BYTES=6,START=1,ATTR=(SEQ,U) FIELD NAME=HAHA,BYTES=4,START=7,ATTR= FIELD NAME=/SX2,BYTES=4,START=0,ATTR= XDFLD NAME=SEG4KE4,SEGMENT=SEG4 SEGM NAME=SEG3,PARENT=(SEG2,(,)),SOURCE=((,),(,)) FIELD NAME=SEG3KEY,BYTES=6,START=1,ATTR=(SEQ,U) FIELD NAME=KAKA,BYTES=4,START=7,ATTR= FIELD NAME=CACA,BYTES=4,START=11,ATTR= SEGM NAME=SEG4,PARENT=(SEG2,(,)),SOURCE=((,),(,)) FIELD NAME=SEG4KEY,BYTES=6,START=1,ATTR=(SEQ,U) FIELD NAME=BABA,BYTES=4,START=7,ATTR= FIELD NAME=/CKXX,BYTES=18,START=1,ATTR= FIELD NAME=/SX1,BYTES=4,START=0,ATTR= SEGM NAME=SEG5,PARENT=(SEG1,(,)),SOURCE=((,),(,)) LCHILD NAME=(POINTE5,EXHIIX5),PAIR=,INDEX= FIELD NAME=SEG5KEY,BYTES=6,START=1,ATTR=(SEQ,U) FIELD NAME=DADA,BYTES=4,START=7,ATTR= XDFLD NAME=SEG5KE5,SEGMENT=SEG5 *** Generating copybooks for the physical DBD segment SEG1 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM/SEG1.cpy *** Generating copybooks for the physical DBD segment SEG2 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM/SEG2.cpy *** Generating copybooks for the physical DBD segment SEG3 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM/SEG3.cpy *** Generating copybooks for the physical DBD segment SEG4 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM/SEG4.cpy *** Generating copybooks for the physical DBD segment SEG5 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM/SEG5.cpy >>>>> Successfully generated copybooks for DBD "EXHIDAM" PROGRAM COMPLETED SUCCESSFULLY. Total : [1]
The layout file is created in the default copybook directory as follows:
$ ls -al -rw-rw-r-- 1 jjeong jjeong 136 9월 10 09:46 SEG1.cpy -rw-rw-r-- 1 jjeong jjeong 109 9월 10 09:46 SEG2.cpy -rw-rw-r-- 1 jjeong jjeong 162 9월 10 09:46 SEG3.cpy -rw-rw-r-- 1 jjeong jjeong 109 9월 10 09:46 SEG4.cpy -rw-rw-r-- 1 jjeong jjeong 136 9월 10 09:46 SEG5.cpy
The following is the content of the layout file.
$ vim SEG1.cpy *generated by DBDCPYBKGEN 01 SEG1. 03 SEG1KEY PIC X(6). 03 KOSI PIC X(4). 03 FILLER PIC X(38).
The following is an example of using the tool to create the layout with variable length in DBD.
$ dbdcpybkgen EXHIDAM
After a successful execution of the previous command, the following messages are displayed.
dbdcpybkgen version 7.2.0(0) oframe@:ofsrc/ims(#1) 2018-02-05 11:32:29 Database Description Block Copybook Generation Program DBDCPYBKGEN FCOUNT=1 --HiDB runs on debug mode --HiDB connection name is HIDB_NX_CONN --HiDB DLI functions show data buffer --HiDB resets application buffer if GET request fails --HiDB alters key sequences -HiDB use CONVERT('WE8EBCDIC1047', 'MSWIN949') key sequence --HiDB requests SELECT query with LEAD for GET NEXT without SSA --HiDB requests SELECT query with LEAD for GET NEXT IN PARENT without SSA --HiDB uses RDB indicator to check column status --HiDB use 0x20 to default value of fetched columns ------------------------------------------------------------ *** Processing DBD script "EXHIDAM4" ------------------------------------------------------------ >>>>> Processing DBD "EXHIDAM4" *** DBD information DBD NAME=EXHIDAM4,ACCESS=(8,2),RMNAME=(,1,16,0) DATASET LABEL=,DD1=HIDAMD,DD2=,CISZ1=0,CISZ2=0 BLOCK=(0,0),DEVICE=3380,SCAN=0,FRSPC(0,0) SEGM NAME=SEG1,PARENT=(,(,)),SOURCE=((,),(,)) LCHILD NAME=(POINTER,EXHIIN4),PAIR=,INDEX= FIELD NAME=SEG1KEY,BYTES=4,START=3,ATTR=(SEQ,U) FIELD NAME=KOSI,BYTES=4,START=7,ATTR= *** Generating copybooks for the physical DBD segment SEG1 to /home/jjeong/prog_test/hidb_project/sears_20180423/copybook/EXHIDAM4/SEG1.cpy >>>>> Successfully generated copybooks for DBD "EXHIDAM4" PROGRAM COMPLETED SUCCESSFULLY. Total : [1]
The following is the content of the layout file.
$ vim SEG1.cpy *generated by DBDCPYBKGEN 01 SEG1. 03 DATALEN PIC 9(4) COMP. 03 SEG1KEY PIC X(4). 03 VARDATA2 PIC X(42).
Configuration
Specify the directory where a new layout is to be stored in the VALUE of the COPYBOOK_DIR key in the HIDB_DEFAULT section of the hidb subject under OpenFrame Configuration.
$ ofconfig list -s hidb -sec HIDB_DEFAULT -k COPYBOOK_DIR ================================================================================== SUBJECT | SECTION | KEY | VALUE ================================================================================== hidb | HIDB_DEFAULT | COPYBOOK_DIR | /home/openframe/copybook ==================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
3. dliprep
The dliprep tool converts the EXEC DLI interface of an application into a HiDB internal interface by precompiling the source file.
Usage
The following is how to execute the dliprep.
Usage: dliprep [options] <file>
-
[options]
Option Description [-v]
Displays the version information of the dliprep.
[-h]
Displays help for dliprep.
-
Parameters
Parameter Description file
Specifies the application source file to be precompiled.
Examples
The following is an example of creating the source of the application converted to the HiDB internal interface by precompiling a general application source.
$ dliprep EXAM.cob
After a successful execution of the previous command, the following message appears.
dliprep: EXAM.cob: preprocessed successfully.
The following output file is created in the directory where dliprep was executed.
$ ls -al -rw-rw-r-- 1 oframe oframe 5568 5월 20 10:32 dliprep_EXAM.cob
The content of the input file is as follows:
$ vim EXAM.cob IDENTIFICATION DIVISION. PROGRAM-ID. EXAMPLE. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. DATA DIVISION. FILE SECTION. WORKING-STORAGE SECTION. 01 CONSTANT-AREA. 03 OUTREC-LEN PIC 9(4) COMP VALUE 300. 01 PSBNAME PIC X(8) VALUE 'EXAMPSB '. 01 SEGMENT-NAME PIC X(8). 01 SEGMENT-DATA PIC X(10). 01 WHERE-RHS1 PIC X(5). 01 WHERE-RHS2 PIC X(5). LINKAGE SECTION. 01 DB-PCB. 03 DBD-NAME PIC X(8). 03 SEG-LEVEL PIC XX. 03 STATUS-CODE PIC XX. 03 PROCOPT PIC X(4). 03 RESERVED PIC X(4). 03 SEG-NAME PIC X(8). 03 KEYLEN PIC 9(8) COMP. 03 NSENSEG PIC 9(8) COMP. 03 CCATKEY PIC X(6). PROCEDURE DIVISION. ENTRY 'DLITCBL' USING DB-PCB. EXEC DLI SCHEDULE PSB((PSBNAME)) END-EXEC. EXIT.
The content of the output file is as follows:
$ vim dliprep-EXAM.cob IDENTIFICATION DIVISION. PROGRAM-ID. EXAMPLE. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. DATA DIVISION. FILE SECTION. WORKING-STORAGE SECTION. 01 CONSTANT-AREA. 03 OUTREC-LEN PIC 9(4) COMP VALUE 300. 01 PSBNAME PIC X(8) VALUE 'EXAMPSB '. 01 SEGMENT-NAME PIC X(8). 01 SEGMENT-DATA PIC X(10). 01 WHERE-RHS1 PIC X(5). 01 WHERE-RHS2 PIC X(5). 01 HIDB-DLI-REQ. 03 HIDB-FUNCTYPE PIC X(8). 03 HIDB-CHKPID PIC X(8). 03 HIDB-PSBNAME PIC X(8). 03 HIDB-CHKPAREA USAGE POINTER OCCURS 3 TIMES. 03 HIDB-CHKPLEN PIC 9(8) COMP-5 OCCURS 3 TIMES. 03 HIDB-PCBNO PIC 9(8) COMP-5. 03 HIDB-MAXLEN PIC 9(8) COMP-5. 03 HIDB-FEEDBACKLEN PIC 9(8) COMP-5. 03 HIDB-SCHDFLAGS PIC 9(8) COMP-5. 03 HIDB-SEGMCOUNT PIC 9(8) COMP-5. 03 HIDB-SEGM OCCURS 16 TIMES. 05 HIDB-SEGMNAME PIC X(8). 05 HIDB-SEGMLEN PIC 9(8) COMP-5. 05 HIDB-OFFSET PIC 9(8) COMP-5. 05 HIDB-SEGDATAAREA USAGE POINTER. 05 HIDB-KEYAREA USAGE POINTER. 05 HIDB-KEYLEN PIC 9(8) COMP-5. 05 HIDB-FIELDLEN PIC 9(8) COMP-5. 05 HIDB-SEGMFLAGS PIC 9(8) COMP-5. 05 HIDB-QUALSCNT PIC 9(8) COMP-5. 05 HIDB-QUALS OCCURS 16 TIMES. 07 HIDB-LOP PIC X(8). 07 HIDB-KEYFLD PIC X(8). 07 HIDB-ROP PIC X(2). 07 FILLER PIC X(6). 07 HIDB-VADDR USAGE POINTER. 07 HIDB-VADDRLEN PIC 9(8) COMP-5. 07 FILLER PIC X(4). 05 HIDB-OCCTYPE PIC X(1). 05 HIDB-SETZERO PIC X(1). 05 HIDB-LOCKCLASS PIC X(1). 05 HIDB-MOVENEXT PIC X(1). 05 HIDB-GETFIRST PIC X(1). 05 HIDB-SEGMSET PIC X(1). 05 HIDB-SETCOND PIC X(1). 05 FILLER PIC X(1). 03 HIDB-KEYFEEDBACK USAGE POINTER. 03 HIDB-DATAAREA USAGE POINTER. 03 DLZDIB. 05 DIBVER PIC X(2). 05 DIBSTAT PIC X(2). 05 DIBSEGM PIC X(8). 05 DIBFIL01 PIC X(1). 05 DIBFIL02 PIC X(1). 05 DIBSEGLV PIC X(2). 05 DIBKFBL PIC S9(4) COMP-5. 05 DIBDBDNM PIC X(8). 05 DIBDBORG PIC X(8). 05 DIBFIL03 PIC X(6). LINKAGE SECTION. 01 DB-PCB. 03 DBD-NAME PIC X(8). 03 SEG-LEVEL PIC XX. 03 STATUS-CODE PIC XX. 03 PROCOPT PIC X(4). 03 RESERVED PIC X(4). 03 SEG-NAME PIC X(8). 03 KEYLEN PIC 9(8) COMP. 03 NSENSEG PIC 9(8) COMP. 03 CCATKEY PIC X(6). 01 DLIUIB. 02 UIBPCBAL USAGE IS POINTER. 02 UIBRCODE. 03 UIBFCTR PIC X. 88 FCNORESP VALUE X'00'. 88 FCNOTOPEN VALUE X'0C'. 88 FCINVREQ VALUE X'08'. 88 FCINVPCB VALUE X'10'. 03 UIBDLTR PIC X. 88 DLPSBNF VALUE X'01'. 88 DLTASKNA VALUE X'02'. 88 DLPSBSCH VALUE X'03'. 88 DLLANGCON VALUE X'04'. 88 DLPSBFAIL VALUE X'05'. 88 DLPSBNA VALUE X'06'. 88 DLTERMNS VALUE X'07'. 88 DLFUNCNS VALUE X'08'. 88 DLINA VALUE X'FF'. PROCEDURE DIVISION. ENTRY 'DLITCBL' USING DB-PCB. * EXEC DLI SCHEDULE PSB (( PSBNAME )) END-EXEC. INITIALIZE HIDB-DLI-REQ. MOVE "SCHD " TO HIDB-FUNCTYPE OF HIDB-DLI-REQ. MOVE PSBNAME TO HIDB-PSBNAME OF HIDB-DLI-REQ. CALL 'ims_cdli_execute' USING BY REFERENCE HIDB-DLI-REQ. EXIT.
4. hdgensch
The hdgensch tool creates data set migration schema files that are necessary for migrating Mainframe IMS DB data sets to HiDB data sets.
In general, you can create schema files with the cobgensch or pligensch tool, and use them as input to the data set migration tool, dsmigin. In HiDB, however, you must use the hdgensch tool to create schema files. This is because general data sets use one-to-one mapping between a segment and a copybook while there can be one-to-many mappings between a segment and copybooks in HiDB. The hdgensch internally calls cobgensch or pligensch to process copybooks for each segment and then merges them into a single schema file.
It also saves the COBOL layout, which is used to create the tables and DML files for each segment, in the OFM_HIDB_DBD_COLUMN meta table.
After a successful run of hdgensch, a schema file is created with the DBD name and '.conv' extension in the default schema directory set in the ds subject of OpenFrame configuration, and the COBOL layout for each segment is saved in the meta table. The syntax of the schema is the same as that of the schema created in the cobgensch or pligensch tool.
For more information about the syntax of schema files or the multi-layout structure, refer to "Chapter3. Data Set Migration" in OpenFrame Migration Guide. |
Usage
The following is how to execute the hdgensch.
Usage: hdgensch <schema|meta|all> dbd-name [copybook-dir-name] [options]
-
<commands>
Command Description schema
Creates the schema file for the DBD.
meta
Saves the segment layout information of the DBD in the meta table by referencing the COBOL copybook.
all
Executes both the schema and meta commands.
-
[options]
Option Description [-v]
Displays the hdgensch version.
[-t] <n|b|t>
Specifies how to save information about a column specified in an OCCURS clause.
-
n (normal): saves each column as meta data by assigning a number to it.
-
b (bulk): saves all columns as a single column meta data. The total length equals to the sum of all columns.
-
t (table): saves the columns in a separate table. This is currently not supported.
[-h]
Displays help for hdgensch.
[-f]
Deletes the existing DBD column information, and then creates new one.
[-u]
Creates a column name by replacing dashes (-) in the layout (copybooks and include files) with underscores (_).
[-p]
This option must be specified if the copybook is written in PL/I (default: COBOL).
[-he]
Takes the segment name as EBCDIC type.
-
-
Parameters
Parameter Description dbd-name
Name of a DBD that defines the database to save the schema or COBOL layout metadata.
The DBD must be defined in the default DBDLIB before running hdgensch, and the DBD name can be up to 8 characters long. For more information about defining DBDLIB, refer to dbdgen.
copybook-dir-name
Name of the directory that contains COBOL copybooks with the HiDB data set field information. The COBOL copybook file must be named with the segment name specified in DBD and '.cpy' extension. The PL/I copybook must be named with the segment specified in DBD and '.inc' extension.
Default: path specified in COPYBOOK_DIR key of the HIDB_DEFAULT section in hidb subject of HiDB configuration.
Examples
The following is an example of using the tool to create the schema file.
$ hdgensch all TMAX01PD -f
After a successful execution of the previous command, the following messages are displayed.
hdgensch Version 7.2.0(0) oframe@:ofsrc7/ims(#3) 2018-02-10 16:35:34 HiDB Schema File Generation Program. --HiDB runs on debug mode --HiDB connection name is HIDB_NX_CONN --HiDB will automatically fix data errors --HiDB DLI functions show data buffer column information for dbd TMAX01PD removed. column information for segment REAL generated. column information for segment TRFC generated. column information for segment PAYR generated. column information for segment REGS generated. copybook information generated. input filename = /home/arena/oframe_7_fix3/hidb_test/cpybook/TMAX01PD/REAL.cpy scheme filename = /home/arena/oframe_7_fix3/schema/REAL.conv -> Segment('REAL') schema was merged. input filename = /home/arena/oframe_7_fix3/hidb_test/cpybook/TMAX01PD/TRFC.cpy scheme filename = /home/arena/oframe_7_fix3/schema/TRFC.conv -> Segment('TRFC') schema was merged. input filename = /home/arena/oframe_7_fix3/hidb_test/cpybook/TMAX01PD/PAYR.cpy scheme filename = /home/arena/oframe_7_fix3/schema/PAYR.conv -> Segment('PAYR') schema was merged. input filename = /home/arena/oframe_7_fix3/hidb_test/cpybook/TMAX01PD/REGS.cpy scheme filename = /home/arena/oframe_7_fix3/schema/REGS.conv -> Segment('REGS') schema was merged. HiDB schema('TMAX01PD.conv') was generated successfully.
The schema file is created in the default schema directory as follows:
$ ls -al -rw-r--r-- 1 adb adb 13862 Oct 6 10:41 TMAX01PD.conv
Configuration
-
Set the directory to store the new schema file in the VALUE of the SCHEMA_DIR key in the DATASET_DIRECTORY section of the ds subject under OpenFrame Configuration.
$ ofconfig list -s ds -sec DATASET_DIRECTORY -k SCHEMA_DIR ============================================================================================= SUBJECT | SECTION | KEY | VALUE ============================================================================================== ds | DATASET_DIRECTORY | SCHEMA_DIR | /home/openframe/schema ==============================================================================================
-
Specify the DBDLIB with the target database DBD in the VALUE of the DBDLIB_NAME key in the IMS_DEFAULT section of the ims subject under OpenFrame Configuration.
$ ofconfig list -s ims -sec IMS_DEFAULT -k DBDLIB_NAME =================================================================================== SUBJECT | SECTION | KEY | VALUE =================================================================================== ims | IMS_DEFAULT | DBDLIB_NAME | IMS.DBDLIB ===================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
5. hdload
The hdload tool takes data sets in the OpenFrame standard ASCII code format and loads them to the HiDB database.
The input data set must be in the format described in the following figure. The format is the same as that of the unload data set created by the DFSURGU0 utility.
Usage
The following is how to execute the hdload.
Usage: hdload [options] dbd-name load-data-file [log=log-file]
-
[options]
Option Description [-v]
Displays the hdload version.
[-h]
Displays help for hdload.
[-q]
Loads data without inserting secondary index table.
[-mk]
Creates a file in a format to load the data by using tbLoader (sqlldr in Oracle).
Set a path where the file is created in the value of the HIDB_IMPORT_DIR key in the HIDB_DEFAULT section of hidb subject of OpenFrame Configuration.
[-im]
Loads data created with the -mk option in conventional method by using tbImport API.
[-im2]
Loads data created with the -mk option in DPL method by using tbImport API.
[-ld]
Loads data created with the -mk option in conventional method by using tbLoader (sqlldr in Oracle).
[-ld2]
Loads data created with the -mk option in DPL method by using tbLoader (sqlldr in Oracle).
[-mg]
Merges data created with the -mk option by using tbLoader (sqlldr in Oracle).
If the key field of data to load is the same as that of data already loaded, REPLACE is executed. OCC_ID is not updated. If the key field of data to load is the not same as that of data already loaded, INSERT is executed.
[-qim]
Executes both -mk and -im options at once.
Specify dbd-name and load-data-file.
[-qimd]
Executes both -mk and -im2 options at once.
Specify dbd-name and load-data-file.
[-qld]
Executes both -mk and -ld options at once.
Specify dbd-name and load-data-file.
[-qldd]
Executes both -mk and -ld2 options at once.
Specify dbd-name and load-data-file.
[-qmg]
Executes both -mk and -mg options at once.
Specify dbd-name and load-data-file.
-
Parameters
Parameter Description dbd-name
Name of the DBD that contains the database definition of the input file.
You must register the DBD in the default DBDLIB before running hdload. The name can be up to 8 characters long. For more information about defining DBDLIB, refer to dbdgen.
load-data-file
Target input file to be loaded by hdload. If the file size is 0, the HDAM and HIDAM databases execute data set initialization (pre-format).
[log=log-file]
Log file where loading will be logged for each segment.
With this parameter, you can identify the cause of a reloading error because the log data set stores records of the segment sequence, name, key value, and status code of the target data set being reloaded.
Examples
The following is an example of creating schema files by using the tool.
$ hdload TMAX01PD tmax01pd.hdb
TMAX01PD is the name of the DBD that defines the database to load, and 'tmax01pd.hdb' is the input file converted to the HiDB standard format. 'TMAX01PD.dd' is the file containing information required to dynamically allocate data sets of the target database, and 'res_out' is the output file that is used for the prefix resolution process.
When you execute the tool, the following message appears.
hdload Version 7.2.0(0) oframe@tplinux32:ofsrc7/ims(#1) 2017-11-09 23:14:22 HiDB Data Load Program (*) HiDB DATA LOAD 100% COMPLETED. *** HIERARCHICAL DIRECT DB REORG RELOAD *** SEGMENT LEVEL STATISTICS TOTAL SEGMENTS BY SEGMENT TYPE =========================================== SEGMENT SEGMENT NAME LEVEL RELOADED DIFFERENCE ------------------------------------------- TMAX1VAA 1 9628 TMAX1VAD 2 9628 TMAX1VAE 2 0 TMAX1VAB 2 28243 TMAX1VAF 3 28243 TMAX1VAC 3 15586 TMAX1VAG 2 0 ------------------------------------------- TOTAL SEGMENTS IN DATABASE UNLOADED RELOADED DIFFERENCE 91328 91328 =========================================== EXECUTION TIME(USER/SYS/REAL): 11.62, 5.34, 148.01
-
SEGMENT LEVEL STATISTICS
The following is a list of the SEGMENT LEVEL STATISTICS field items.
Item Description SEGMENT NAME
Segment name of statistics information in the same category.
SEGMENT LEVEL
The hierarchical level of a segment within the database.
RELOADED
Total number of segment instances that are reloaded in a database.
DIFFERENCE
Difference between the reload count and the unload count. If there is no difference, this field will be left blank.
If the reload count is greater than the unload count, the field will have a positive value. If the reload count is less than the unload count, the field will have a negative value.
-
TOTAL SEGMENTS IN DATABASE
The following is a list of the TOTAL SEGMENTS IN DATABASE field items.
Item Description UNLOADED
Number of segment instances that were unloaded by the HD Reorganization Unload utility (DFSURGU0).
RELOADED
Number of segment instances that were reloaded by the HD Reorganization Reload utility (DFSURGL0).
DIFFERENCE
Difference between the number of reloads and unloads. If there is no difference, this field will be left blank.
Configuration
Specify the DBDLIB where the target database DBD is defined in the VALUE of the DBDLIB_NAME key in the IMS_DEFAULT section of the ims subject under OpenFrame Configuration.
$ ofconfig list -s ims -sec IMS_DEFAULT -k DBDLIB_NAME =================================================================================== SUBJECT | SECTION | KEY | VALUE =================================================================================== ims | IMS_DEFAULT | DBDLIB_NAME | IMS.DBDLIB ===================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
6. hdpcdf01
The hdpcdf01 tool takes the data sets unloaded by the IMS HD Reorganization Unload utility (DFSURGU0) to create HiDB standard format data sets that can be processed by the hdload tool.
You cannot reload the data sets unloaded by DFSURGU0 to the HiDB database. In order to reload them, you must process them with the hdpcdf01 tool, which analyzes the internal format of the DFSURGU0-created data sets, removes the header and the trailer, and formats them to fit the HiDB database reload format.
The following shows the output format of the data set.
Usage
The following is how to execute the hdpcdf01.
Usage: hdpcdf01 [options] [format] if=input-file of=output-file dbd=dbd-name
-
[options]
Option Description [-v]
Displays the hdpcdf01 version.
[-h]
Displays help for hdpcdf01.
[-d]
Displays the current processing position in the input file during hdpcdf01 execution.
[-hp number]
Used to specify the header length in bytes to analyze the input file format.
[-dp number]
Used to specify the segment data length in bytes to analyze the input file format.
[-rdw]
Specified if the input file has variable-length data sets containing 4-byte RDW.
[-addpk]
Adds the key area of a parent segment to the beginning of its child segment record. The added key area is referenced to convert the child segment during data set migration.
-
[format]
Option Description [-f1]
Specified if the input file has data sets unloaded from a SHISAM database.
[-dedb]
Specified if the input file has data sets unloaded from a DEDB database.
-
Parameters
Parameter Description if=input-file
hdpcdf01 input file, which is the data set created by DFSURGU0.
of=output-file
hdpcdf01 output file. The output is given as input to the dsmigin tool.
dbd=dbd-name
Name of the DBD that defines the database of the input file.
You must define the DBD in the default DBDLIB before running hdpcdf01. The name of the DBD can be up to 8 characters long. For more information about defining DBDLIB, refer to dbdgen.
Usage
The following is an example of creating a schema file using the tool.
$ hdpcdf01 if=tmax01uld.dat of=tmax01uld.hdb dbd=TMAX01PD
When you execute the command, the following message appears.
hdpcdf01 version 7.2.0(1) obuild@tplinux32:ofsrc7/ims(#1) 2017-11-09 23:14:22 HiDB Pre-conversion Program * Bytes of Header Part : 243 * Bytes of Trailer Part : 245 * Bytes of Input file : 23147438 * Position of Trailer part: 23147193 * Current Position of Reading:23146727, Segment:TMAX1VAA * MESSAGE: input data reading success. *** HDPCDF01 DATA CONVERSION *** SEGMENT LEVEL STATISTICS TOTAL SEGMENTS BY SEGMENT TYPE ========================================== SEGMENT READ NAME COUNT ------------------------------------------- TMAX1VAA 9629 TMAX1VAD 9628 TMAX1VAE 0 TMAX1VAB 28243 TMAX1VAF 28243 TMAX1VAC 15586 ------------------------------------------- TOTAL SEGMENTS IN DATABASE = 91329 ==========================================
The schema file has been created in the default schema directory as follows:
$ ls -al -rw-r--r-- 1 adb adb 13862 Oct 6 10:41 TMAX01PD.conv
Configuration
-
Specify the directory where a new schema file is to be stored in the VALUE of the SCHEMA_DIR key in the DATASET_DIRECTORY section of the ds subject under OpenFrame Configuration.
$ ofconfig list -s ds -sec DATASET_DIRECTORY -k SCHEMA_DIR =================================================================================== SUBJECT | SECTION | KEY | VALUE =================================================================================== ds | DATASET_DIRECTORY | SCHEMA_DIR | /home/openframe/schema ===================================================================================
-
Specify the DBDLIB that contains the DBD of the target database in the VALUE of the DBDLIB_NAME key in the IMS_DEFAULT section of the ims subject under OpenFrame Configuration.
$ ofconfig list -s ims -sec IMS_DEFAULT -k DBDLIB_NAME =================================================================================== SUBJECT | SECTION | KEY | VALUE =================================================================================== ims | IMS_DEFAULT | DBDLIB_NAME | IMS.ACBLIB ===================================================================================
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
7. hidbptrmgr
The hidbptrmgr tool controls the ID mappings for a secondary index and a logical relationship.
If you are using a secondary index, the hidbptrmgr tool inserts data into the secondary index segment table associated with segments defined in the target DBD. If you are using a logical relationship, the hidbptrmgr tool identifies the logical parent of a logical child segment defined in the target DBD and updates the LPARENT_ID column.
Given that the VALUE of the NO_INDEX_TABLE key in the HIDB_DEFAULT section of the hidb subject under OpenFrame Configuration is set to NO, the hidbptrmgr tool is required if one of the following condition applies:
-
if the DBD with the index source segment is run with the hdload -q command; or
-
if the DBD with a logical child segment is run with the hdload command.
For more information about OpenFrame Configuration, refer to OpenFrame Configuration Guide. |
Usage
The following is how to execute the hidbptrmgr.
Usage: hidbptrmgr <command> dbd-name
-
<command>
Command Description si
Inserts data into the secondary index table associated with the secondary index source segment defined in the target DBD.
lr
Updates the LPARENT_ID column (logical parent ID column) associated with a logical child segment table defined in the target DBD.
all
Runs both si and lr commands.
sil
Loads the option in a conventional manner using tbLoader (in case of Oracle, using sqlldr).
sil2
Loads the option in a DPL manner using tbLoader (in case of Oracle, using sqlldr).
lr2
Same as the lr option, but internally reduces query issuance.
lr3
Same as the lr2 option, but uses the merge statement.
lr4
Updates the LPARENT_ID column (logical parent ID column) of the logical child segment table in table units.
-
Parameters
Parameter Description dbd-name
Name of the target DBD.
Usage
The following is an example of using the tool.
$ hidbptrmgr si TESTDBD1 $ hidbptrmgr lr TESTDBD2
When you execute the command, the following messages appear.
HIDBPTRMGR version 7.2.0(0) tmaxtp@:oframe/ims(#1) 2017-11-29 09:50:54 HiDB secondary index build tool - insert data to secondary index segment table HIDBPTRMGR: successfully finished the request for the DBD TESTDBD EXECUTION TIME(USER/SYS/REAL): 0.02, 0.00, 0.08
8. hidbreconv
The hidbreconv tool converts the output data format of HiDB into the input data format of the source data when loading HiDB data back into the source database. It operates in the opposite way to the hdpcdf01.
Unloading HiDB data with DFSURGU0 and then exporting the data set by dsmigout converts the data to the same character set as the source database. However, in order to use the load utility of the source database, it is necessary to create a new header since the old one has been removed by the hdpcdf01. This tool adds the header information of the source database to the data exported by dsmigout.
Usage
The following is how to execute the hidbreconv.
Usage: hidbreconv <dbd_name> <input_filepath> [output_filepath] [options]
-
Parameters
Parameter Description dbd_name
Name of a DBD that defines the database of input files.
input_filepath
Input file that has been unloaded by DFSURGU0 and migrated by dsmigout.
output_filepath
Output file of hidbreconv tool (default: a file with the same name as the input file is created in the current directory with the '.rfm' extension).
-
[options]
Option Description [-v]
Displays the hidbreconv version.
[-h]
Displays help for hidbreconv.
[-ftpb]
Creates an output file in FTP -B format.
Examples
The following is an example of using the tool to create the data for loading the source database.
$ hidbreconv TSTDBD hidbuld.dat hidbuld.rfm
After a successful execution of the previous command, the following messages are displayed.
hidbreconv version 7.2.0(0) oframe@:ofsrc7/ims(#2) 2017-11-29 09:50:54 Convert HiDB segment data hidbreconv: process request --DBD: TSTDBD --Input file: hidbuld.dat --Output file: hidbuld.rfm EXECUTION TIME(USER/SYS/REAL): 0.00, 0.00, 0.00 hidbreconv: request for the DBD TSTDBD is finished successfully --Input file: hidbuld.dat --Output file: hidbuld.rfm