This page describes all the data types that Mainframe Connector supports.
Universal field modifiers
All sized elementary COBOL fields support the following universal
transcoder field modifiers
(configured using defaults, field_suffixes, or field_overrides):
null_if: Decodes or encodesNULLbased on an indicator field's value.null_if_empty: Decodes asNULLif all bytes in the field are0x00(low-values); encodesNULLas0x00bytes.decode_as_null: Decodes asNULLif all bytes match a configuredhex_bytesvalue (for example,"40"for EBCDIC spaces,"00"for low-values, or"FF"for high-values) or if the decoded value matches a list ofvalues.encode_null_as: EncodesNULLas a repeatedhex_byteor a specific defaultvalue.null_if_invalid: Decodes invalid field data asNULLinstead of sending the rejected record to the spillover dataset.bytes: Overrides the field to read and write rawBYTESwithout character decoding.filler: Excludes the field from the decoded output schema and fills it withhex_byte(default0x40) during encoding.chain: Applies multiple field modifiers in sequence.
COBOL data type mapping table
| COBOL usage type | Additional supported field modifiers | Copybook or modifier condition | Logical type | ORC type | BigQuery data type |
|---|---|---|---|---|---|
COMP-1, COMP-2( COMPUTATIONAL-1, COMPUTATIONAL-2)
|
hfp |
COMP-1 (4-byte single precision) or COMP-2 (8-byte double precision) with no PICTURE clause, or any 4- or 8-byte field with the hfp modifier. |
Double |
double |
FLOAT64 |
BINARY, COMP, COMPUTATIONAL, COMP-4, COMP-5 (Signed) |
binaryformat_date
|
Default for binary fields, or when binary.signedness is set to SIGNED.Byte size by precision ( p):
binary modifier.)
|
Long |
bigint |
INT64 |
BINARY, COMP, COMPUTATIONAL, COMP-4, COMP-5 (Unsigned) |
binaryformat_date
|
binary modifier is applied with signedness set to UNSIGNED. |
Long |
bigint |
INT64 |
DISPLAY (or any sized field as raw bytes) |
bytes |
Any field with a static byte size that has the bytes field modifier applied (via field_overrides, field_suffixes, or defaults). |
Bytes |
binary |
BYTES |
DISPLAY (or integer Long field) as Date |
format_datestring
|
String field (DISPLAY, DISPLAY-1, NATIONAL, UTF-8) or integer field (Long logical type) with the format_date modifier and a format entry matching the field's character length (for strings) or digit precision (for integers). |
Date |
date |
DATE |
DISPLAY (String) as Timestamp |
format_timestampstring
|
String field with the format_timestamp modifier and a format entry matching the field's byte size. |
Timestamp |
timestamp |
TIMESTAMP |
DISPLAY (*) (Alphanumeric) |
string |
USAGE DISPLAY (or omitted USAGE) with an alphanumeric, alphabetic, or alphanumeric-edited PICTURE (X, A, B, 0, /).
|
String |
string |
STRING |
DISPLAY-1 (DBCS) |
string |
USAGE DISPLAY-1 with PIC G (optionally with B) or PIC N. Each symbol occupies 2 bytes. |
String |
string |
STRING |
NATIONAL |
string |
USAGE NATIONAL with PIC N (or omitted USAGE with PIC N). Each symbol occupies 2 bytes. |
String |
string |
STRING |
UTF-8 |
string |
USAGE UTF-8 with PIC U (or omitted USAGE with PIC U). |
String |
string |
STRING |
DISPLAY (GROUP) (Variable-length string) |
varlen |
A group field with the varlen modifier containing two subfields:
|
String |
string |
STRING |
PACKED-DECIMAL( COMP-3, COMPUTATIONAL-3)
|
packed_decimalformat_date (when Long)
|
precision ≤ 18 and scale = 0(or packed_decimal.logical_type set to LONG)
|
Long |
bigint |
INT64 |
PACKED-DECIMAL( COMP-3, COMPUTATIONAL-3)
|
packed_decimal |
precision ≤ 18 and scale > 0(or packed_decimal.logical_type set to DECIMAL64)
|
Decimal64 |
decimal(p, s) |
NUMERIC |
PACKED-DECIMAL( COMP-3, COMPUTATIONAL-3)
|
packed_decimal |
19 ≤ precision ≤ 38 and scale = 0(or packed_decimal.logical_type set to BIG_INTEGER)
|
BigInteger |
decimal(38, 0) |
|
PACKED-DECIMAL( COMP-3, COMPUTATIONAL-3)
|
packed_decimal |
19 ≤ precision ≤ 38 and scale > 0(or packed_decimal.logical_type set to BIG_DECIMAL)
|
BigDecimal |
decimal(p, s) |
|
ZONED( DISPLAY with numeric PICTURE)
|
zoned_decimalformat_date
|
precision ≤ 18 and scale = 0(or zoned_decimal.logical_type set to LONG)
|
Long |
bigint |
INT64 |
ZONED( DISPLAY with numeric PICTURE)
|
zoned_decimal |
precision ≤ 18 and scale > 0(or zoned_decimal.logical_type set to DECIMAL64)
|
Decimal64 |
decimal(p, s) |
NUMERIC |
ZONED( DISPLAY with numeric PICTURE)
|
zoned_decimal |
19 ≤ precision ≤ 38 and scale = 0(or zoned_decimal.logical_type set to BIG_INTEGER)
|
BigInteger |
decimal(38, 0) |
|
ZONED( DISPLAY with numeric PICTURE)
|
zoned_decimal |
19 ≤ precision ≤ 38 and scale > 0(or zoned_decimal.logical_type set to BIG_DECIMAL)
|
BigDecimal |
decimal(p, s) |
|