Data types
The parallel job column definitions have an associated SQL type. This maps onto an underlying data type. Here is a summary of the underlying data types that columns definitions can have.
When you work with parallel job column definitions, you will see that they have an SQL type associated with them. This maps onto an underlying data type which you use when specifying a schema via a file, and which you can view in the Parallel tab of the Edit Column Meta Data dialog box. The underlying data type is what a parallel job data set understands. The following table summarizes the underlying data types that columns definitions can have:
SQL Type | Underlying Data Type | Size | Description |
---|---|---|---|
Date | date | 4 bytes | Date with month, day, and year |
Decimal Numeric | decimal | (Roundup(p)+1)/2 | Packed decimal, compatible with IBM® packed decimal format |
Float Real | sfloat | 4 bytes | IEEE single-precision (32-bit) floating point value |
Double | dfloat | 8 bytes | IEEE double-precision (64-bit) floating point value |
TinyInt | int8 uint8 | 1 byte | Signed or unsigned integer of 8 bits (Extended (unsigned) option for unsigned) |
SmallInt | int16 uint16 | 2 bytes | Signed or unsigned integer of 16 bits (Extended (unsigned) option for unsigned) |
Integer | int32 uint32 | 4 bytes | Signed or unsigned integer of 32 bits (Extended (unsigned) option for unsigned) |
BigInt1 | int64 uint64 | 8 bytes | Signed or unsigned integer of 64 bits (Extended (unsigned) option for unsigned) |
Binary Bit LongVarBinary VarBinary | raw | 1 byte per character | Untypes collection, consisting of a fixed or variable number of contiguous bytes and an optional alignment value |
Unknown Char LongVarChar VarChar | string | 1 byte per character | ASCII character string of fixed or variable length (without the extended(Unicode) option selected) |
NChar NVarChar LongNVarChar | ustring | multiple bytes per character | ASCII character string of fixed or variable length (without the extended(Unicode) option selected) |
Char LongVarChar VarChar | ustring | multiple bytes per character | ASCII character string of fixed or variable length (with the extended(Unicode) option selected) |
Char | subrec | sum of lengths of subrecord fields | Complex data type comprising nested columns |
Char | tagged | sum of lengths of subrecord fields | Complex data type comprising tagged columns, of which one can be referenced when the column is used |
Time | time | 5 bytes | Time of day, with resolution of seconds. |
Time | time(microseconds) | 5 bytes | Time of day, with resolution of microseconds (Extended (Microseconds) option selected). |
Timestamp | timestamp | 9 bytes | Single field containing both date and time value |
Timestamp | timestamp(microseconds) | 9 bytes | Single field containing both date and time value, with resolution of microseconds (Extended (Microseconds) option selected). |
1BigInt values map to long long integers on all
supported platforms except Tru64 where they map to longer integers.
For all platforms except Tru64, the c_format is: Because Tru64 supports real 64-bit integers, its c_format is:
The integer component specifies a minimum field width. The output column is printed at least this wide, and wider if necessary. If the column has fewer digits than the field width, it is padded on the left with padding_character to make up the field width. The default padding character is a space. For this example c_format specification: '%09lld' the padding character is zero (0), and the integers 123456 and 123456789 are printed out as 000123456 and 123456789. |
When you work with mainframe data using the CFF stage, the data types are as follows:
COBOL Data Type | Size | COBOL Usage Representation | Underlying Data Type | Property |
---|---|---|---|---|
binary, native binary | 2 bytes | S9(1-4) COMP/COMP-5 | int16 | |
binary, native binary | 4 bytes | S9(5-9) COMP/COMP-5 | int32 | |
binary, native binary | 8 bytes | S9(10-18) COMP/COMP-5 | int64 | |
binary, native binary | 2 bytes | 9(1-4) COMP/COMP-5 | uint16 | |
binary, native binary | 4 bytes | 9(5-9) COMP/COMP-5 | uint32 | |
binary, native binary | 8 bytes | 9(10-18) COMP/COMP-5 | uint64 | |
character | n bytes | X(n) | string[n] | |
character for filler | n bytes | X(n) | raw(n) | |
varchar | n bytes | X(n) | string[max=n] | |
decimal | (x+y)/2+1 bytes | 9(x)V9(y)COMP-3 | decimal[x+y,y] | packed |
decimal | (x+y)/2+1 bytes | S9(x)V9(y)COMP-3 | decimal[x+y,y] | packed |
display_numeric | x+y bytes | 9(x)V9(y) | decimal[x+y,y] or string[x+y] | zoned |
display_numeric | x+y bytes | S9(x)V9(y) | decimal[x+y,y] or string[x+y] | zoned, trailing |
display_numeric | x+y bytes | S9(x)V9(y) sign is trailing | decimal[x+y,y] | zoned, trailing |
display_numeric | x+y bytes | S9(x)V9(y) sign is leading | decimal[x+y,y] | zoned, leading |
display_numeric | x+y+1 bytes | S9(x)V9(y) sign is trailing separate | decimal[x+y,y] | separate, trailing |
display_numeric | x+y+1 bytes | S9(x)V9(y) sign is leading separate | decimal[x+y,y] | separate, leading |
float | 4 bytes 8 bytes | COMP-1 COMP-2 | sfloat dfloat | floating point |
graphic_n, graphic_g | n*2 bytes | N(n) or G(n) DISPLAY-1 | ustring[n] | |
vargraphic_g/n | n*2 bytes | N(n) or G(n) DISPLAY-1 | ustring[max=n] | |
group | subrec |