Skip Headers
Oracle® Database Gateway for IMS User's Guide
11g Release 2 (11.2)

Part Number E12072-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Data Type Conversion

This appendix contains the following section:

Conversion of Atomic Data Types

The gateway converts atomic data types in the advanced data dictionary (ADD) to Oracle data types as described in Table A-1.

Table A-1 Atomic Data Types

ADD Data Type Oracle Data Type Details

apt_date

DATE

Date packed into a 4-character string.

Format: DMYY

Example: 23-Jul-1998 is represented by four bytes: 19, 98, 7, and 23.

apt_time

DATE

ADD date-time format.

bit

NUMBER(3)

Single bit within a byte.

Size: 1 byte.

Format: datatype="bit"

onBit="n"

Where n specifies which bit (within a byte) the field uses.

If more than one bit is defined, then the additional bits may be defined sequentially within the same byte (or bytes, if the number of bits requires this much space).

bits

NUMBER(3)

A signed number of bits within a byte.

Size: 1 bit to 1 byte

Format: <field name="name" datatype="bits" onBit="n" size="m"/>

Where n specifies which bit (within a byte) to start from and m is the number of bits. If n is not specified then n defaults to 1 for the first occurrence of the field and is contiguous thereafter.

The maximum number of bits you can map is 32.

cstring

VARCHAR2

A null-terminated string of alphanumeric characters; maximum length must be specified. An extra byte is required for the null flag.

cv_datetime

DATE

CorVision date-time format.

date

DATE

ODBC date format.

date6

DATE

Date in a string having the form YYMMDD

date8

DATE

Date in a string having the form YYYYMMDD

dfloat

FLOAT(49)

Double floating-point number (D_FLOAT)

Size: 8 bytes

Range: 0.29E-38 to 1.7E38

Precision: 16 digits.

filler

RAW

Allocation for future use, string type; length must be specified.

fixed_cstring

FLOAT(49)

A fixed null-terminated string of numeric characters; length must be specified. An extra byte is required for the null flag.

int1

NUMBER(3)

Signed byte integer.

Size: 1 byte

Range: -128 to +127

int2

NUMBER(5)

Signed word integer.

Size: 1 byte

Range: -32768 to +32767

int3

NUMBER(10)

Signed integer

Size: 3 bytes

int4

NUMBER(10)

Signed long integer.

Size: 4 bytes

Range: -2147483648 to +2147483647

int6

NUMBER(10)

Signed integer

Size: 6 bytes

int_date

DATE

Date in a four-byte integer having the form YYMMDD or YYYYMMDD.

Example, 23-Jul-1998 has the form: 980723 or 19980723.

jdate

DATE

Julian date

Size: 2 bytes

Bits 0-6: (non-century) year

Bits 7-15: day of the year

logical

NUMBER(10)

Signed long integer

Values: 1 for true, 0 for false

mvs_date

DATE

z/OS date format.

mvs_datetime

DATE

z/OS date-time format.

mvs_time

DATE

z/OS time format.

padded_str_date

DATE

Padded date format, not null-terminated.

padded_str_datetime

DATE

Padded date format, not null-terminated.

padded_str_time

DATE

Padded date format, not null-terminated.

phdate

DATE

Size: 2 bytes

Bits 0-6: (non-century) year

Bits 7-10: number of month

Bits 11-15: day of month

single

FLOAT(23)

Single floating-point number (F_FLOAT).

Size: 4 bytes

Range: 0.29E-38 to 1.7E38

Precision: 6 digits

str_date

CHAR(10)

Atomic date string

Size: 10 characters

Format: YYYY-MM-DD

str_datetime

CHAR(19)

Atomic date-time string.

Size: 19 characters

Format: YYYY-MM-DD HH:MM:SS

str_time

CHAR(8)

Atomic date string

Size: 8 characters

Format: HH:MM:SS

string

CHAR

String of alphanumeric characters; length must be specified.

time

DATE

ODBC time format.

timestamp

DATE

ODBC date-time format.

ubits

NUMBE(3)

An unsigned number of bits within a byte.

Size: 1 bit to 1 byte

Format: <field name="name" datetype="bits" onBit="n" size="m"/>

Where n specifies which bit (within a byte) to start from and m is the number of bits. If n is not specified, then n defaults to1 for the first occurrence of the field and its contiguous thereafter.

The maximum number of bits you can map is 31.

uint1

NUMBER(3)

Unsigned byte integer.

Size: 1 byte

Range: 0 to +254

uint2

NUMBER(10)

Unsugned word integer.

Size: 2 bytes

Range: 0 to+65534

uint4

NUMBER(11)

Signed long integer

Size: 4 bytes

Range: 0 to +4,294,967,294

uint6

NUMBER

Unsugned integer.

Size: 6 bytes

unicode

VARCHAR2

A null-terminated alphanumeric unicode string. Maximum length must be specified.

varstring

VARCHAR2

16-bit count, followed by a string.

varstring4

VARCHAR2

32-bit count, followed by a string.


Conversion of Non-Atomic Data Types

The gateway converts atomic data types to Oracle data types as described in Table A-1.

Table A-2 Non-atomic Data Types

ADD Data Type Oracle Data Type Details

binary

RAW

Unknown data type, string type; length must be specified.

nls_string

CHAR

A string based on language and driven by table.


Conversion of Decimal Data Types

The gateway converts decimal data types to Oracle data types as described in Table A-3.

Table A-3 Decimal Data Types

ADD Data Type Oracle Data Type Details

decimal

NUMBER

Packed decimal

Maximum number of digits: 31

Maximum fractions: 11

Length = int (number of digits/2) + 1 bytes

numeric_cstring

NUMBER

A null-terminated string of numeric characters; maximum length must be specified. An extra byte is required for the null flag.

numstr_bdn

NUMBER

Signed numeric string. Sign is the first character of the string.

Maximum number of digits: 31

Maximum fractions: 11

Note: the number of fractions includes the decimal point.

numstr_nlo

NUMBER

Signed numeric string. A left overpunched sign is implemented.

Maximum number of digits: 31

Maximum fractions: 11

numstr_nl

NUMBER

Signed numeric string. Sign is the first character of the string.

Maximum number of digits: 31

Maximum fractions: 11

numstr_nr

NUMBER

Signed numeric string. Sign is the last character of the string.

Maximum number of digits: 31

Maximum fractions: 11

numstr_s

NUMBER

Signed numeric string. A right overpunched sign is implemented.

Maximum number of digits: 31

Maximum fractions: 11

The number must be right-justified (for example, " 1234N" is -12345). The number can be left-padded by either spaces or zeros. If a scale is provided, it is a fixed positional scale. No decimal point is provided in the data (for example, a value of "1234E" with scale 2 is interpreted as "123.45").

numstr_u

NUMBER

Unsigned numeric string.

Maximum number of digits: 31

Maximum fractions: 11

numstr_zoned

NUMBER

Signed numeric string

Maximum number of digits: 31

Maximum fractions: 11


Conversion of Scaled Data Types

The gateway converts scaled data types to Oracle data types as described in Table A-4.

Table A-4 Scaled Data Types

ADD Data Type Oracle Data Type Details

scaled_int1

NUMBER

Signed byte integer.

Size: 1 byte

Range: -128 to +127

Maximum: 3

scaled_int2

NUMBER

Singlwe word integer.

Size: 2 byts

Range: -32768 to +32767

Maximum: 5

scaled_int3

NUMBER

Signed integer.

Size: 3 bytes

scaled_int4

NUMBER

Signed long integer.

Size: 4 bytes

Range: -2147483648 to +2147483647

Maximum: 10

scaled_int6

NUMBER

Signed integer

Size: 6 bytes

scaled_int8

NUMBER

Signed quadword.

Size: 4 bytes

Range: -2147483648 to +2147483647

Maximum: 10

scaled_uint1

NUMBER

Unsigned byte integer.

Size: 1 byte

Range: 0 to +254

Maximum: 3

scaled_uint2

NUMBER

Unsigned word integer.

Size: 2 bytes

Range: 0 to +65534

Maximum: 5

scaled_uint4

NUMBER(5)

Unsigned long integer

Size: 4 bytes

Range: 0 to +4,294,967,294

Maximum: 10