2.3.2 Data Translation Rules
The following table lists the data translation rules that TMA TCP gateway follows.
Table 2-2 Data Translation Rules
Field Type | Translation Rules |
---|---|
CARRAY
|
Passed untranslated as sequences of bytes |
STRING and CHAR
|
Translated from ASCII to EBCDIC (if needed) |
SHORT
|
Translated to S9(4) COMP |
LONG
|
Translated to S9(9) COMP |
FLOAT
|
Translated to COMP-1 |
DOUBLE
|
Translated to COMP-2 |
Note:
Oracle Tuxedo provides a field type nameddec_t
that supports decimal values within VIEW
s. The TMA TCP gateway product translates these fields into machine independent representations of packed decimals. For example, dec_t(m,n)
becomes S9(2*m-(n+1))V9(n) COMP-3
. Therefore, a decimal field with a size of 8,5 corresponds to S9(10)V9(5) COMP-3
.
The following table summarizes the translation rules between C and IBM/370 data types.
Table 2-3 Translation Rules Between C and IBM/370 Data Types
Remote Data Type | Description | View Field Type/Length |
---|---|---|
PIC X(n)
|
Alpha-numeric Characters | string / n |
PIC X
|
Single Alpha-numeric Character | char |
PIC X(n)
|
Raw Bytes | carray / n |
PIC X
|
Single Numeric Byte | carray / 1 |
PIC S9(4) COMP
|
16-bit Integer | short |
PIC S9(9) COMP
|
32-bit Integer | long |
COMP-1
|
Single-precision Floating Point | float |
COMP-2
|
Double-precision Floating Point | double |
PIC
S9((m+(n+1))/2)V9
(n)
COMP-3
|
Packed Decimal | dec_t / m,n |
Parent topic: Translating Data with TMA TCP gateway