OpenFrame/HiDB 7.2
This chapter briefly describes the features that have been added or modified in OpenFrame/HiDB 7.2. For more information, refer to the relevant guides.
1. Updated Features
This section describes the updated features of the new version.
1.1. Changed Structure for EBCDIC Sort Order
-
HiDB 7.1 supported EBCDIC sort order by using UTL_OF package.
-
HiDB 7.2 supports EBCDIC sort order by using NVARCHAR2 data type.
-
The following examples show CREATE TABLE statements executed in HiDB 7.1 and HiDB 7.2.
-
HiDB 7.1
CREATE TABLE DMAN0201_SEGMENT1( OCC_ID NUMBER(18), "K1" VARCHAR(2 CHAR), "K2" VARCHAR(2 CHAR), PD_BIT NUMBER(1), LD_BIT NUMBER(1), "HIDB_K12" AS (UTL_OF.ASC2EBC(RAWTOHEX("K1"), 2, 1) || UTL_OF.ASC2EBC(RAWTOHEX("K2"), 2, 1)), CONSTRAINT DMAN0201_SEGMENT1_PK PRIMARY KEY(OCC_ID), CONSTRAINT DMAN0201_SEGMENT1_UK UNIQUE("K1", "K2", OCC_ID)) TABLESPACE "DEFVOL"
-
HiDB 7.2
CREATE TABLE DMAN0201_SEGMENT1( OCC_ID NUMBER(18), "K1" NVARCHAR2(2), "K2" NVARCHAR2(2), PD_BIT NUMBER(1), LD_BIT NUMBER(1), CONSTRAINT DMAN0201_SEGMENT1_PK PRIMARY KEY(OCC_ID), CONSTRAINT DMAN0201_SEGMENT1_UK UNIQUE("K1", "K2", OCC_ID)) TABLESPACE "DEFVOL"
-
1.2. Improved dbdcpybkgen Tool
-
If some of the DBD fields overlap each other, a copybook with the overlapping and non-overlapping fields is created.
For example, if there is a physical DBD as follows:
<DMAN0201>
DBD NAME=DMAN0201,ACCESS=HDAM DATASET DD1=DMAN0201 SEGM NAME=SEGMENT1,BYTES=(7,6) FIELD NAME=(SEG1FLD1,SEQ,U),START=3,BYTES=4 FIELD NAME=SEG1FLD2,START=6,BYTES=1 DBDGEN FINISH END
The following copybook is created when the dbdcpybkgen tool is executed.
<DMAN0201/SEGMENT1.cpy>
*generated by DBDCPYBKGEN 01 SEGMENT1. 03 DATALEN PIC 9(4) COMP. 03 SEG1FLD1 PIC X(3). 03 SEG1FLD2 PIC X(1). 03 HIDBFLD-2 PIC X(1).
-
If an index DBD refers to system-related fields (whose names start with /SX or /CK) of the index source segment, a copybook having those fields is created.
For example, if there is a physical DBD, an index DBD, and a copybook as follows:
<DMAN0201>
DBD NAME=DMAN0201,ACCESS=HDAM DATASET DD1=DMAN0201 SEGM NAME=SEGMENT1,BYTES=4 FIELD NAME=(K12,SEQ,U),START=1,BYTES=4 SEGM NAME=SEGMENT2,PARENT=SEGMENT1,BYTES=4 FIELD NAME=(K34,SEQ,U),START=1,BYTES=4 SEGM NAME=SEGMENT3,PARENT=SEGMENT2,BYTES=4 FIELD NAME=(K56,SEQ,U),START=1,BYTES=4 FIELD NAME=/CK1,START=1,BYTES=2 FIELD NAME=/CK12,START=1,BYTES=4 FIELD NAME=/CK123,START=1,BYTES=6 FIELD NAME=/CK1234,START=1,BYTES=8 FIELD NAME=/CK12345,START=1,BYTES=10 LCHILD NAME=(XSGMENT1,XMAN0201),PTR=INDX XDFLD NAME=SEG3XFL1,SEGMENT=SEGMENT3,SRCH=/CK12345,SUBSEQ=/CK1 DBDGEN FINISH END
<XMAN0201>
DBD NAME=XMAN0201,ACCESS=INDEX DATASET DD1=XMAN0201 SEGM NAME=XSGMENT1,BYTES=10 FIELD NAME=(SEG3XFL1,SEQ,U),START=1,BYTES=10 LCHILD NAME=(SEGMENT3,DMAN0201),INDEX=SEG3XFL1 DBDGEN FINISH END
<DMAN0201/SEGMENT1.cpy>
01 SEGMENT1. 03 K12. 05 K1 PIC XX. 05 K2 PIC XX.
<DMAN0201/SEGMENT2.cpy>
01 SEGMENT2. 03 K34. 05 K3 PIC XX. 05 K4 PIC XX.
<DMAN0201/SEGMENT3.cpy>
01 SEGMENT3. 03 K56. 05 K5 PIC XX. 05 K6 PIC XX.
the following copybook is created when dbdcpybkgen tool is executed for the index DBD.
<XMAN0201/XSGMENT1.cpy>
*generated by DBDCPYBKGEN 01 XSGMENT1. 03 CK12345 PIC X(10). 03 CK1 PIC X(2).
-
Note
-
In HiDB 7.2, for all fields in DBD, if a copybook does not have fields starting and ending at the same position as those in DBD, an error message is displayed. Therefore, fields in a copybook must be same as those in DBD for normal operation.
-
If the fields in the copybook used for migration is different from those in DBD, the user needs to split the fields in the copybook to fit the field range of DBD or to create a copybook automatically by using the dbdcpybkgen tool.
-
For the DBD with variable length segments defined, use the copybook automatically created by the dbdcpybkgen tool.
-
For the DBD with the secondary index segments defined, use the copybook automatically created by the dbdcpybkgen tool. Before that, you must create the metadata and schema of the physical DBD as follows:
dbdgen {File name of a physical DBD} hdgensch all {DBD name of a physical DBD}
-
1.3. Changed Structure for Prefetching
-
In HiDB 7.1, parent segment instances were prefetched by using the LEAD function.
-
In HiDB 7.2, parent segment instances are prefetched by using a scrollable cursor.
-
The following examples show SELECT statements executed in HiDB 7.1 and HiDB 7.2.
-
HiDB 7.1
SELECT /*+ INDEX_ASC(DMAN0201_SEGMENT3 DMAN0201_SEGMENT3_PIDX) FIRST_ROWS(10) */ OCC_ID, "SEG3FLD1", PARENT_ID, PARENT_KEY, 0 AS PRIOR_ID, 0 AS NEXT_ID, 0 AS LPARENT_ID, LEAD(PARENT_ID, 1) OVER(ORDER BY HIDB_PARENT_KEY, HIDB_SEG3FLD1) AS NEXT_PARENT_ID, LEAD(PARENT_KEY, 1) OVER(ORDER BY HIDB_PARENT_KEY, HIDB_SEG3FLD1) AS NEXT_PARENT_KEY FROM DMAN0201_SEGMENT3 WHERE ...
-
HiDB 7.2
SELECT /*+ INDEX_ASC(DMAN0201_SEGMENT3 DMAN0201_SEGMENT3_PIDX) FIRST_ROWS(10) */ OCC_ID, "SEG3FLD1", "PK0_SEG1FLD1", PARENT_ID, 0 AS PRIOR_ID, 0 AS NEXT_ID, 0 AS LPARENT_ID FROM DMAN0201_SEGMENT3 WHERE ("PK0_SEG1FLD1") >= ((CHR(48) || CHR(48) || CHR(48))) AND (("SEG3FLD1") >= ((CHR(0) || CHR(0) || CHR(0)))) ORDER BY "PK0_SEG1FLD1", "SEG3FLD1" ASC
-
-
Additional Information
-
You can control whether to prefetch by defining the GNALLPARENT parameter in a SEGM statement. For more details about the GNALLPARENT parameter, refer to the relevant description in OpenFrame HiDB Guide.
-
1.4. Changed Structure for Field Comparison
-
In HiDB 7.1, the columns that fields in DBD reference to were compared by using the concatenation operator (||).
-
In HiDB 7.2, the columns that fields in DBD reference to are compared by using tuple comparison.
-
The following examples show SELECT statements executed in HiDB 7.1 and HiDB 7.2.
-
HiDB 7.1
SELECT /*+ INDEX_ASC(DMAN0201_SEGMENT1 DMAN0201_SEGMENT1_UNIQ) FIRST_ROWS(10) */ OCC_ID, "K1", "K2", 0 AS PRIOR_ID, 0 AS NEXT_ID, 0 AS LPARENT_ID FROM DMAN0201_SEGMENT1 WHERE ("HIDB_K12" = TO_CHAR(CHR(49) || CHR(49)) || TO_CHAR(CHR(65) || CHR(65))) AND (OCC_ID > 0) ORDER BY OCC_ID ASC
-
HiDB 7.2
SELECT /*+ INDEX_ASC(DMAN0201_SEGMENT1 DMAN0201_SEGMENT1_PK) FIRST_ROWS(10) */ OCC_ID, "K1", "K2", 0 AS PRIOR_ID, 0 AS NEXT_ID, 0 AS LPARENT_ID FROM DMAN0201_SEGMENT1 WHERE (("K1", "K2") = ((CHR(49) || CHR(49)), (CHR(65) || CHR(65)))) AND (OCC_ID > 0) ORDER BY OCC_ID ASC
-
1.5. Changed Method of Defining External Procedure
-
In HiDB 7.1, an external procedure was defined in a segment by using the REMARKS parameter.
-
In HiDB 7.2, an external procedure is defined in a segment by using the EXTPROC parameter. For more details about the EXTPROC parameter, refer to the relevant description in OpenFrame HiDB Guide.
1.6. Building Library for DLI Automatically
-
In HiDB 7.2, a dynamic library file is created by precompiling and compiling a .pc file automatically when the DLI function is created with the hidbmgr tool.
-
The following examples show how to create a dynamic library file in HiDB 7.1 and HiDB 7.2.
-
HiDB 7.1
$ hidbmgr dbd dligen DMAN0201 $ cd $OPENFRAME_HOME/hidb/hidb_sch $ ./compile.sh
-
HiDB 7.2
$ hidbmgr dbd dligen DMAN0201
-
For more details about hidbmgr, refer to OpenFrame Tool Reference Guide. |
1.7. Managing OpenFrame Configuration Information as Tables
-
Modified so that the existing file-based OpenFrame configuration information can be managed as tables in a database.
-
Modified the configuration meta file format to be loaded in a database, and separated each file by individual product.
-
Modified to load data into Tmax TCache in order to synchronize the configuration information and support multi-node environments.
-
Added the ofconfig tool to manage the modified configuration information structure.
-
For more details about OpenFrame configuration, refer to OpenFrame Configuration Guide.
-
For more details about the ofconfig tool, refer to OpenFrame Tool Reference Guide.
-
1.8. Managing Error Codes as Tables
-
Modified so that the existing file-based OpenFrame error information can be managed in a database.
-
Added the insert feature to the oferror tool to load error information into a database.
For more details about the oferror tool, refer to OpenFrame Tool Reference Guide.
1.9. Formatting System and Server Logs
-
Formatted logs for all OpenFrame products.
-
Added the date-hour display format to logs.
-
Service log format
[YYYY-MM-DDTHH:MM:SS.ffffff] [SERVICE-NAME(PID)] [M] [MSGCODE] MESSAGE-CONTENTS
-
System log format
[YYYY-MM-DDTHH:MM:SS.ffffff] [EXECUTED-MODULE] [CODE] [MSGCODE] EVENT FREE-FORMAT-CONTENTS
-
Operation log format
[YYYY-MM-DDTHH:MM:SS.ffffff] [EXECUTED-MODULE] [CODE] [MSGCODE] EVENT FREE-FORMAT-CONTENTS
For more details about logs in OpenFrame, refer to "Appendix.D Log Management" in OpenFrame Base Guide.
-