Unique Syntax for Database Definition
This appendix describes the unique syntax of OpenFrame/HiDB, which is different from the source system, used when defining database.
Other syntax defining database is same as the source DB. |
1. SEGM Statement
The SEGM statement is used to define a segment type in a database. For more information, refer to DBD in Database Management.
1.1. EXTPROC
Specified to use database functions or user-defined external procedure when arranging data of a segment.
-
Syntax
EXTPROC='<EP>Function type,Target field,Starting position,Length</EP>'
Item Description <EP>, </EP>
Specifies the start and end of the external procedure format.
Function Type
Specifies the type of function as a C-style string. The placeholder is %s.
Target Field
Specifies the target field for the placeholder.
Starting Position
Specifies the starting position of the target field.
Length
Specifies the length of the target field.
-
Example
EXTPROC='<EP>TO_CHAR(%s),SEG1KEY,0,6</EP>'
1.2. GNALLPARENT
When processing GET NEXT on a segment with the parent, it is specified to execute a SELECT query to get all rows and to search with a scrollable cursor. There is no change in its operation even if it is specified for a root segment.
-
Syntax
GNALLPARENT=(GN,GP,UNQSSA)
Item Description GN
Applied to GET NEXT command where the search condition for the segment is not specified.
GP
Applied to GET NEXT IN PARENT command where the search condition for the segment is not specified.
UNQSSA
Applies GN and GP even when unqualified search condition is specified. However, the UNQSSA, GN, or GP must be applied to all segments except for the root in the path from the root segment to the segment.
-
Example
GNALLPARENT=(GN,GP)