Nonstop Database, HiRDB Version 9 UAP Development Guide
This section provides the correspondence between SQL data types and C data descriptions. Data can be exchanged between variables of compatible data types and between variables of either convertible or assignable data types.
The following table shows the SQL data types and C data descriptions.
Table F-1 SQL data types and C data descriptions
SQL data type | C data description | Remarks | |
---|---|---|---|
SMALLINT | short variable-name; | -- | |
INTEGER | long variable-name; | -- | |
DECIMAL [(p[,s])] | SQL TYPE IS DECIMAL(p,s) variable-name;#5 |
1 |
|
SMALLFLT, REAL | float variable-name; | -- | |
FLOAT (DOUBLE PRECISION) | double variable-name; | -- | |
CHAR [(n)] [CHARACTER SET character-set-specification] |
char [CHARACTER SET[IS] character-set-specification] variable-name[n+1];#1 |
1 character-set-specification: [MASTER.]EBCDIK |
|
CHAR[(2n)] CHARACTER SET character-set-specification |
char CHARACTER SET[IS] character-set-specification variable-name[2n+2]; |
1 character-set-specification: [MASTER.]UTF16 |
|
SQL TYPE IS CHAR(2n) CHARACTER SET[IS] character-set-specification character-set-specification variable-name;#10 |
|||
VARCHAR(n) [CHARACTER SET character-set-specification] |
struct { short variable-name-1; char variable-name-2[n]; }[CHARACTER SET[IS] character-set-specification] structure-name; |
1 variable-name-1: Character string length (bytes) variable-name-2: Character string character-set-specification: [MASTER.]EBCDIK |
|
SQL TYPE IS VARCHAR(n) [CHARACTER SET[IS] character-set-specification] variable-name;#6 |
|||
VARCHAR [CHARACTER SET[IS] character-set-specification] variable-name[n+1]#9 |
|||
VARCHAR(2n) CHARACTER SET character-set-specification |
struct { short variable-name-1; char variable-name-2[2n]; } CHARACTER SET[IS] character-set-specification structure-name; |
1 variable-name-1: Character string length (number of bytes, as a multiple of 2) variable-name-2: Character string character-set-specification: [MASTER.]UTF16 |
|
SQL TYPE IS VARCHAR(2n) CHARACTER SET[IS] character-set-specification variable-name;#11 |
|||
VARCHAR CHARACTER SET[IS] character-set-specification variable-name[2n+2];#10 |
|||
NCHAR [(n)] | char variable-name-2[2n+1];#1 | 1 |
|
NVARCHAR(n) | struct { short variable-name-1; char variable-name-2[2n]; } structure-name; |
1 variable-name-1: Character string length (number of characters) variable-name-2: Character string |
|
SQL TYPE IS NVARCHAR(n) variable-name;#6 |
|||
MCHAR [(n)] | char variable-name[n+1];#1 | 1 |
|
MVARCHAR(n) | struct { short variable-name-1; char variable-name-2[n]; } structure-name; |
1 variable-name-1: Character string length (number of bytes) variable-name-2: Character string |
|
SQL TYPE IS MVARCHAR(n) variable-name;#6 |
|||
DATE | char variable-name[11];#2 | -- | |
TIME | char variable-name[9];#2 | -- | |
INTERVAL YEAR TO DAY | SQL TYPE IS DECIMAL(8,0) variable-name;#5 |
-- | |
INTERVAL HOUR TO SECOND | SQL TYPE IS DECIMAL(6,0) variable-name;#5 |
-- | |
TIMESTAMP[(p)] | char variable-name[n + 1];#2 | If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
|
ROW#3 | char variable-name[n + 1]; | 1 |
|
BLOB | SQL TYPE IS BLOB(n[K |M |G])] variable-name;#4 |
Default: 1 In units of K: 1 In units of M: 1 In units of G: 1 |
|
BINARY(n) | struct { long variable-name-1; char variable-name-2[n]; } structure-name; |
1 variable-name-1: Character string length (number of bytes) variable-name-2: Character string |
|
SQL TYPE IS BINARY(n) variable-name;#7 |
|||
BLOB locator | SQL TYPE IS BLOB AS LOCATOR variable-name#8 |
-- | |
BINARY locator | SQL TYPE IS BINARY AS LOCATOR variable-name#8 |
-- | |
Indicator variable | Other than BLOB, BINARY, BLOB locator, or BINARY locator | short variable-name; | -- |
BLOB, BINARY, BLOB locator, or BINARY locator | long variable-name; | ||
SQL statement | struct { long variable-name-1; char variable-name-2[n]; } structure-name; |
1 variable-name-1: Character string length (number of bytes) variable-name-2: Character string |
struct{ long variable-name_reserved; 1 unsigned long variable-name_length; 2 char variable-name_data[m]; 3 } variable-name
unsigned char variable-name[p/2
+1];
Sign in hexadecimal representation | Description |
---|---|
X'C' | Treated as a positive sign. Positive numbers include 0. |
X'D' | Treated as a negative sign. |
struct{ short len; char str[n]; }variable-name
struct{ long len; char str[n]; }variable-name
unsigned long variable-name;
char variable-name[n+1];
char variable-name[2n+2];
type-specifier variable-name[n+1];
struct{ short len; char str[2n]; } variable-name;
struct{ short len; type-specifier str[n]; } variable-name;
The following table shows the SQL data types and C data descriptions when arrays are used.
Table F-2 SQL data types and C data descriptions when arrays are used
SQL data type | C data description | Remarks | |
---|---|---|---|
SMALLINT | short variable-name[m]; | -- | |
INTEGER | long variable-name[m]; | -- | |
DECIMAL[(p[,s])] | SQL TYPE IS DECIMAL(p,s) variable-name[m]; |
1 |
|
SMALLFLT, REAL | float variable-name[m]; | -- | |
FLOAT (DOUBLE PRECISION) | double variable-name[m]; | -- | |
CHAR[(n)] [CHARACTER SET character-set-specification] |
char [CHARACTER SET[IS] character-set-specification] variable-name[m][n+1]; |
1 character-set-specification: [MASTER.]EBCDIK |
|
CHAR[(2n)] CHARACTER SET character-set-specification |
char CHARACTER SET[IS] character-set-specification variable-name[m][2n+2]; |
1 character-set-specification: [MASTER.]UTF16 |
|
SQL TYPE IS CHAR(2n) CHARACTER SET[IS] character-set-specification variable-name[m]; |
|||
VARCHAR(n) [CHARACTER SET character-set-specification] |
struct { short variable-name-1; char variable-name-2[n]; }[CHARACTER SET[IS] character-set-specification] structure-name[m]; |
1 character-set-specification: [MASTER.]EBCDIK |
|
SQL TYPE IS VARCHAR(n) [CHARACTER SET[IS] character-set-specification] variable-name[m]; |
-- | ||
VARCHAR [CHARACTER SET[IS] character-set-specification] variable-name[m][n+1]; |
|||
VARCHAR(2n) CHARACTER SET character-set-specification |
struct { short variable-name-1; char variable-name-2[2n]; } CHARACTER SET[IS] character-set-specification structure-name[m]; |
1 variable-name-1: Character string length (number of bytes, as a multiple of 2) variable-name-2: Character string character-set-specification: [MASTER.]UTF16 |
|
SQL TYPE IS VARCHAR(n) CHARACTER SET[IS] character-set-specification variable-name[m]; |
|||
VARCHAR CHARACTER SET[IS] character-set-specification variable-name[m][2n+2] |
|||
NCHAR[(n)] | char variable-name[m][2n+1]; | 1 |
|
NVARCHAR[(n)] | struct { short variable-name-1; char variable-name-2[2n]; } structure-name[m]; |
1 |
|
SQL TYPE IS NVARCHAR(n) variable-name[m]; |
|||
MCHAR(n) | char variable-name[m][n+1]; | 1 |
|
MVARCHAR(n) | struct { short variable-name-1; char variable-name-2[n]; } structure-name[m]; |
1 |
|
SQL TYPE IS MVARCHAR(n) variable-name[m]; |
|||
DATE | char variable-name[m][11]; | -- | |
TIME | char variable-name[m][9]; | -- | |
TIMESTAMP[(p)] | char variable-name[m][n + 1]; | If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
|
INTERVAL YEAR TO DAY | SQL TYPE IS DECIMAL(8,0) variable-name[m]; |
-- | |
INTERVAL HOUR TO SECOND | SQL TYPE IS DECIMAL(6,0) variable-name[m]; |
-- | |
ROW | char variable-name[m][n+1]; | 1 |
|
BLOB | CN | -- | |
BINARY | struct { long variable-name-1; char variable-name-2[n]; } structure-name[m]; |
|
|
SQL TYPE IS BINARY(n) variable-name[m]; |
|||
BLOB locator | CN | -- | |
BINARY locator | SQL TYPE IS BINARY AS LOCATOR variable-name[m]; |
-- | |
Indicator variable | Other than BINARY or BINARY locator | short variable-name[m]; | -- |
BINARY or BINARY locator | long variable-name[m]; | -- | |
SQL statement | CN | -- |
The following table shows the SQL data types and C data descriptions when repetition columns are used.
Table F-3 SQL data types and C data descriptions when repetition columns are used
SQL data type | C data description | Remarks |
---|---|---|
SMALLINT | PD_MV_SINT(m) variable-name; | -- |
INTEGER | PD_MV_INT(m) variable-name; | -- |
DECIMAL | PD_MV_DEC(m,p,s) variable-name; | 1 0 |
SMALLFLT, REAL | PD_MV_SFLT(m) variable-name; | -- |
FLOAT (DOUBLE PRECISION) | PD_MV_FLT(m) variable-name; | -- |
CHAR[(n)] | PD_MV_CHAR(m,n) variable-name; | 1 |
VARCHAR(n) | PD_MV_VCHAR(m,n) variable-name; | 1 |
PD_MV_CVCHAR(m,n) variable-name; | ||
NCHAR[(n)] | PD_MV_NCHAR(m,n) variable-name; | 1 |
NVARCHAR[(n)] | PD_MV_NVCHAR(m,n) variable-name; | 1 |
MCHAR(n) | PD_MV_CHAR(m, n) variable-name; | 1 |
MVARCHAR(n) | PD_MV_CHAR(m, n) variable-name; | 1 |
DATE | PD_MV_CHAR(m,10) variable-name; | -- |
TIME | PD_MV_CHAR(m,8) variable-name; | -- |
TIMESTAMP[(p)] | PD_MV_CHAR(m,n) variable-name; | If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
INTERVAL YEAR TO DAY | PD_MV_DEC(m,8,0) variable-name; | -- |
INTERVAL HOUR TO SECOND | PD_MV_DEC(m,6,0) variable-name; | -- |
ROW | CN | -- |
BLOB | CN | -- |
BINARY | CN | -- |
Indicator variable (other than BLOB, BINARY, BLOB locator, or BINARY locator) | PD_MV_SINT(m) variable-name; | -- |
SQL statement | CN | -- |
Special macros for referencing or setting embedded variables for each data type are used in the SQL data type and C data description when repetition columns are used. The following table shows the macros for referencing or setting embedded variables.
Table F-4 Macros for referencing or setting embedded variables
SQL data type | Macro name | Data to be referenced or set | Data type |
---|---|---|---|
SMALLINT | PD_MV_SINT_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_SINT_DATA (variable-name, m) | Each repetition element | short | |
INTEGER | PD_MV_INT_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_INT_DATA (variable-name, m) | Each repetition element | long# | |
DECIMAL[(p[,s])] | PD_MV_DEC_CNT (variable-name) |
Current repetition data element count | long# |
PD_MV_DEC_DATA (variable-name,m) |
Start address of each repetition element in decimal | unsigned | |
SMALLFLT, REAL | PD_MV_SFLT_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_SFLT_DATA (variable-name, m) | Each repetition element | float | |
FLOAT (DOUBLE PRECISION) | PD_MV_FLT_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_FLT_DATA (variable-name, m) | Each repetition element | double | |
CHAR[(n)] | PD_MV_CHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_CHAR_DATA (variable-name, m) | Leading address of character string of each repetition element | char[ ] | |
VARCHAR(n) | PD_MV_VCHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_VCHAR_LEN (variable-name, m) | Actual length of character string of each repetition element | short | |
PD_MV_VCHAR_STR (variable-name) | Address of character string of each repetition element | char[ ] | |
PD_MV_CVCHAR_CNT(variable-name) | Current repetition data element count | long# | |
PD_MV_CVCHAR_DATA(variable-name,m) | Address of character string of each repetition element | char[ ] | |
NCHAR[(n)] | PD_MV_NCHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_NCHAR_DATA (variable-name, m) | Leading address of character string of each repetition element | char[ ] | |
NVARCHAR[(n)] | PD_MV_NVCHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_NVCHAR_LEN (variable-name, m) | Actual length of character string of each repetition element | short | |
PD_MV_NVCHAR_STR (variable-name, m) | Leading address of character string of each repetition element | char[ ] | |
MCHAR(n) | PD_MV_CHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_CHAR_DATA (variable-name, m) | Leading address of character string of each repetition element | char[ ] | |
MVARCHAR(n) | PD_MV_VCHAR_CNT (variable-name) | Current repetition data element count | long# |
PD_MV_VCHAR_LEN (variable-name, m) | Actual length of character string of each repetition element | short | |
PD_MV_VCHAR_STR (variable-name, m) | Address of character string of each repetition element | char[ ] | |
DATE | Same as CHAR(10) | -- | -- |
TIME | Same as CHAR(8) | -- | -- |
TIMESTAMP[(p)] | Same as CHAR(n) If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
-- | -- |
INTERVAL YEAR TO DAY | Same as DECIMAL(8,0) | -- | -- |
INTERVAL HOUR TO SECOND | Same as DECIMAL(6,0) | -- | -- |
Indicator variable | PD_MV_SINT_CNT (variable-name) | Indicator of the overall repetition column | long# |
PD_MV_SINT_DATA (variable-name, m) | Indicator of each repetition column element | short |
The following shows an example of macros used for referencing or setting embedded variables in repetition columns:
EXEC SQL BEGIN DECLARE SECTION; char xname[5]; PD_MV_SINT(4) xmscore; PD_MV_CHAR(4,5) xmsubject; EXEC SQL END DECLARE SECTION; : strcpy(xname,"SMITH") PD_MV_SINT_DATA(xmscore,0)=90; PD_MV_SINT_DATA(xmscore,1)=65; PD_MV_SINT_DATA(xmscore,2)=85; PD_MV_SINT_DATA(xmscore,3)=55; PD_MV_SINT_CNT(xmscore)=4; strcpy(PD_MV_CHAR_DATA(xmsubject,0),"MATHEMATICS"); strcpy(PD_MV_CHAR_DATA(xmsubject,1),"ENGLISH"); strcpy(PD_MV_CHAR_DATA(xmsubject,2),"SCIENCE"); strcpy(PD_MV_CHAR_DATA(xmsubject,3),"SOCIAL STUDIES"); PD_MV_CHAR_CNT(xmsubject)=4; EXEC SQL INSERT INTO SCORE_TABLE(NAME,SUBJECT,SCORE))VALUES(:xname, :xmsubject;:xmscore);
The following table shows pointer variables and the C language data description.
Table F-5 Pointer variables and C language data description
SQL data type | C language data description | Remarks | |
---|---|---|---|
SMALLINT | short *variable-name; | -- | |
INTEGER | long *variable-name; | -- | |
DECIMAL[(p[,s])] | SQL TYPE IS DECIMAL(p,s) *variable-name; |
1 |
|
SMALLFLT, REAL | float *variable-name; | -- | |
FLOAT (DOUBLE PRECISION) |
double *variable-name; | -- | |
CHAR[(n)] [CHARACTER SET character-set-specification] |
char * [CHARACTER SET[IS] character-set-specification]*variable-name; |
1 character-set-specification: [MASTER.]EBCDIK |
|
CHAR[(2n)] CHARACTER SET character-set-specification |
SQL TYPE IS CHAR(2n) CHARACTER SET[IS] character-set-specification *variable-name; |
1 character-set-specification: [MASTER.]UTF16 |
|
VARCHAR(n) [CHARACTER SET character-set-specification] |
struct { short variable-name-1; char variable-name-2[n]; } [CHARACTER SET[IS] character-set-specification]*structure-name; |
1 variable-name-1: Character string length (number of bytes) variable-name-2: Character string character-set-specification: [MASTER.]EBCDIK |
|
SQL TYPE IS VARCHAR(n) [CHARACTER SET[IS] character-set-specification] *variable-name; |
|||
VARCHAR [CHARACTER SET[IS] character-set-specification] *variable-name;# |
|||
VARCHAR(2n) CHARACTER SET character-set-specification |
struct { short variable-name-1; char variable-name-2[2n]; } CHARACTER SET[IS] character-set-specification *structure-name; |
1 variable-name-1: Character string length (number of bytes, as a multiple of 2) variable-name-2: Character string character-set-specification: [MASTER.]UTF16 |
|
SQL TYPE IS VARCHAR(2n) CHARACTER SET[IS] character-set-specification *variable-name; |
|||
NCHAR[(n)] | char *variable-name; | 1 |
|
NVARCHAR(n) | struct { short variable-name-1; char variable-name-2[2n]; } *structure-name; |
1 variable-name-1: Character string length (number of characters) variable-name-2: Character string |
|
SQL TYPE IS NVARCHAR(n) *variable-name; |
|||
MCHAR[(n)] | char *variable-name; | 1 |
|
MVARCHAR(n) | struct { short variable-name-1; char variable-name-2[n]; } *structure-name; |
1 variable-name-1: Character string length (number of bytes) variable-name-2: Character string |
|
SQL TYPE IS MVARCHAR(n) *variable-name; |
|||
DATE# | char *variable-name; | -- | |
TIME# | char *variable-name; | -- | |
TIMESTAMP# | char *variable-name; | -- | |
INTERVAL YEAR TO DAY | SQL TYPE IS DECIMAL(8,0) *variable-name; |
-- | |
INTERVAL HOUR TO SECOND | SQL TYPE IS DECIMAL(6,0) *variable-name; |
-- | |
ROW | char *variable-name; | 1 |
|
BLOB | SQL TYPE IS BLOB(n[{K|M|G}]) *variable-name; |
Default: 1 In units of K: 1 In units of M: 1 In units of G: 1 |
|
BINARY(n) | struct { long variable-name-1; char variable-name-2[n]; } *structure-name; |
1 |
|
SQL TYPE IS BINARY(n) *variable-name; |
|||
BLOB locator | SQL TYPE IS BLOB AS LOCATOR *variable-name; |
-- | |
BINARY locator | SQL TYPE IS BINARY AS LOCATOR *variable-name; |
-- | |
Indicator variable | Other than BLOB, BINARY, BLOB locator, or BINARY locator | short *variable-name; | -- |
BLOB, BINARY, BLOB locator, or BINARY locator | long *variable-name; | ||
SQL statement | struct { long variable-name-1; char variable-name-2[n]; } *structure-name; |
1 |
|
SMALLINT ARRAY m | PD_MV_SINT(m) *variable-name; |
-- | |
INTEGER ARRAY m | PD_MV_INT(m) *variable-name; |
-- | |
DECIMAL[(p[,s])] ARRAY m | PD_MV_DEC(m,p,s) *variable-name; |
1 |
|
SMALLFLT ARRAY m (REAL) |
PD_MV_SFLT(m) *variable-name; |
-- | |
FLOAT ARRAY m (DOUBLE PRECISION) |
PD_MV_FLT(m) *variable-name; |
-- | |
CHAR[(n)] ARRAY m and MCHAR[(n)] ARRAY m |
PD_MV_CHAR(m,n) *variable-name; |
1 |
|
VARCHAR[(n)] ARRAY m and MVARCHAR[(n)] ARRAY m | PD_MV_VCHAR(m,n) *variable-name; |
1 |
|
PD_MV_CVCHAR(m,n) *variable-name; |
|||
NCHAR[(n)] ARRAY m | PD_MV_NCHAR(m,n) *variable-name; |
1 |
|
NVARCHAR[(n)] ARRAY m | PD_MV_NVCHAR(m,n) *variable-name; |
1 |
|
DATE ARRAY m | PD_MV_CHAR(m,10) *variable-name; |
-- | |
TIME ARRAY m | PD_MV_CHAR(m,8) *variable-name; |
-- | |
TIMESTAMP ARRAY m | PD_MV_CHAR(m,n) *variable-name; |
If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
|
INTERVAL YEAR TO DAY ARRAY m | PD_MV_DEC(m,8,0) *variable-name; |
-- | |
INTERVAL HOUR TO SECOND ARRAY m | PD_MV_DEC(m,6,0) *variable-name; |
-- | |
Indicator variable for repetition column | PD_MV_SINT(m) *variable-name; |
-- |
To reference or set a variable for a pointer-type repetition column, use a dedicated macro. The following table shows the macros for pointer-type repetition columns.
Table F-6 Macros for pointer-type repetition columns
SQL data type | Macro name | Data to be referenced or set | Data type |
---|---|---|---|
SMALLINT ARRAY m | PD_MV_SINTP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_SINTP_DATA(variable-name,m) | Each repetition element | short | |
INTEGER ARRAY m | PD_MV_INTP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_INTP_DATA(variable-name,m) | Each repetition element | long# | |
DECIMAL[(p[,s])] ARRAY m | PD_MV_DECP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_DECP_DATA(variable-name,m) | Start address of each repetition element in decimal | char[ ] | |
SMALLFLT ARRAY m (REAL) |
PD_MV_SFLTP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_SFLTP_DATA(variable-name,m) | Each repetition element | float | |
FLOAT ARRAY m (DOUBLE PRECISION) |
PD_MV_FLTP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_FLTP_DATA(variable-name,m) | Each repetition element | double | |
CHAR[(n)] ARRAY m, or MCHAR[(n)] ARRAY m | PD_MV_CHARP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_CHARP_DATA(variable-name,m) | Leading address of character string of each repetition element | char[ ] | |
VARCHAR(n) ARRAY m, or MVARCHAR(n) ARRAY m | PD_MV_VCHARP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_VCHARP_LEN(variable-name,m) | Actual length of character string of each repetition element | short | |
PD_MV_VCHARP_STR(variable-name,m) | Address of character string of each repetition element | char[ ] | |
PD_MV_CVCHARP_CNT(variable-name) | Current repetition data element count | long# | |
PD_MV_CVCHARP_DATA(variable-name, m) | Address of character string of each repetition element | char[ ] | |
NCHAR[(n)] ARRAY m | PD_MV_NCHARP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_NCHARP_DATA(variable-name,m) | Leading address of character string of each repetition element | char[ ] | |
NVARCHAR(n) ARRAY m | PD_MV_NVCHARP_CNT(variable-name) | Current repetition data element count | long# |
PD_MV_NVCHARP_LEN(variable-name,m) | Actual length of character string of each repetition element | short | |
PD_MV_NVCHARP_STR(variable-name,m) | Leading address of character string of each repetition element | char[ ] | |
DATE ARRAY m | Same as CHAR(10) | -- | -- |
TIME ARRAY m | Same as CHAR(8) | -- | -- |
TIMESTAMP[(p)] ARRAY m | Same as CHAR(n) If p = 0, n = 19. If p = 2, n = 21 or 22. If p = 4, n = 23 or 24. If p = 6, n = 25 or 26. |
-- | -- |
INTERVAL YEAR TO DAY | Same as DECIMAL(8,0) | -- | -- |
INTERVAL HOUR TO SECOND | Same as DECIMAL(6,0) | -- | -- |
Indicator variable | PD_MV_SINTP_CNT(variable-name) | Indicator of the overall repetition column | long# |
PD_MV_SINTP_DATA(variable-name,m) | Indicator of each repetition column element | short |
The following table shows the structures to be specified in batches.
Table F-7 Structures to be specified in batches
SQL data type | C language data description | Item coding | Remarks |
---|---|---|---|
Multiple items | Structure that contains the data types listed in Tables F-1 to F-3 as members | Specifies multiple embedded variables in a batch. | Pointers can be declared. |
Indicator variable for multiple items | Structure that contains as members the indicator variables listed in Tables F-1 to F-3 | Specifies multiple indicator variables in a batch. | Pointers can be declared. |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.