HPNonStopEnscribeReader data type support and correspondence
Enscribe type | TQL type |
---|---|
PIC X(n) | string |
PIC N(n) | string |
PIC 9(1-4) COMP | int |
PIC S9(1-4) COMP | short |
PIC 9(5-9) COMP | long |
PIC S9(5-9) COMP | int |
PIC 9(10-18) COMP | unsupported |
PIC S9(10-18) COMP | long |
PIC 9(n)V9(s) COMP | string |
PIC S9(n)V9(s) COMP | string |
PIC 9(1-3) COMP-3 | int |
PIC 9(4-9) COMP-3 | long |
PIC 9(10-18) COMP-3 | long |
PIC S9(1-3) COMP-3 | short |
PIC S9(4-9) COMP-3 | int |
PIC S9(10-18) COMP-3 | long |
PIC 9(n)V9(s) COMP-3 | string |
PIC S9(n)V9(s) COMP-3 | string |
PIC 9(n) | long |
PIC T | long |
PIC T9(n) | long |
PIC 9(n)V9(s) | string |
PIC T9(n)V9(s) | string |
PIC 9(n)T | long |
PIC 9(n)V9(s)T | string |
PIC S9(n) | long |
PIC S9(n)V9(s) | string |
PIC 9(n)S | long |
PIC 9(n)V9(s)S | string |
TYPE CHARACTER n | string |
TYPE BINARY 8 UNSIGNED | int |
TYPE BINARY 8 | short |
TYPE BINARY 16,0 UNSIGNED | int |
TYPE BINARY 16,0 | short |
TYPE BINARY 32,0 UNSIGNED | long |
TYPE BINARY 32,0 | int |
TYPE BINARY 64,0 UNSIGNED | unsupported |
TYPE BINARY 64,0 | long |
TYPE BINARY n,s UNSIGNED n = 16, 32 s > 0 | string |
TYPE BINARY n,s n = 16, 32, 64 s > 0 | string |
TYPE FLOAT 32 | double |
TYPE FLOAT 64 | double |
TYPE COMPLEX | two doubles |
TYPE LOGICAL 1 | int |
TYPE LOGICAL 2 | short |
TYPE LOGICAL 4 | int |
TYPE ENUM | short |
TYPE BIT n | short |
TYPE BIT n UNSIGNED | int |
TYPE SQL VARCHAR | string |
TYPE SQL DATE | string |
TYPE SQL TIME | string |
TYPE SQL TIMESTAMP | string |
TYPE SQL DATETIME | string |
TYPE SQL INTERVAL | string |
Any Enscribe field that has the SQLNULLABLE attribute in its DDL description is represented in the database as two fields: A two-byte null indicator field, followed by the actual data field. Striim interprets the null indicator field to determine whether the data field has a valid value or is null, so such fields appear as a single field in the WAEvent. Note that the SQLNULLABLE attribute is different than the NULL attribute that DDL also supports. Striim ignores the NULL attribute.
An Enscribe field of type COMPLEX is represented as two 32-bit floating point values in the database. Striim puts two double values into the WAEvent for each type COMPLEX field – first the real part then the imaginary part. Striim creates field names for those two fields by appending "_R" and "_I" to the name declared for the COMPLEX field in the DDL.
An Enscribe field of type SQL VARCHAR is represented in the database as two fields: A two-byte length field, followed by a character field of the maximum possible length, as given in the SQL VARCHAR declaration. Striim puts just a single string into the WAEvent for the SQL VARCHAR field. This field contains the number of characters from the second field that are indicated by the first field.
Enscribe field types SQL DATE, SQL TIME, SQL TIMESTAMP, SQL DATETIME and SQL INTERVAL are synonyms for fixed-length character fields of the appropriate length for the specific date-time or interval type declared. For example TYPE DATETIME YEAR TO DAY declares a 10-character field whose values are expected to represent a date in the form such as "2015-05-20". Striim does not interpret the values of SQL DATETIME or SQL INTERVAL fields, but simply puts them into the WAEvent as strings. The exact length of each of SQL DATETIME and SQL INTERVAL type is documented in Table D-12 and Table D-13 in HP's "Data Definition Language (DDL) Reference Manual", in the chapter "Dictionary Database Structure", at the end of the description of the DICTOBL file. The types SQL DATE, SQL TIME, and SQL TIMESTAMP are missing from those tables. They are shorthand notation for:
SQL DATE = SQL DATETIME YEAR TO DAY
SQL TIME = SQL DATETIME HOUR TO SECOND
SQL TIMESTAMP = SQL DATETIME YEAR TO FRACTION