DFSORT data formats
DFSORT supports a large number of data formats as described below.
Format | Description |
---|---|
CH | (character EBCDIC, unsigned). Each
character is represented by its 8-bit EBCDIC code. Example: AB7 becomes
C1 C2 F7 Hexadecimal 11000001 11000010 11110111 Binary Note:
|
UTF8 |
Unicode Transformation Format, an 8-bit encoding form designed for ease of use with existing ASCII-based systems. UTF-8 can encode any of the Unicode characters. A UTF-8 character is 1, 2, 3, or 4 bytes in length. A UTF-8 data string can contain any combination of SBCS and MBCS data, including supplementary characters.
Note:
|
UTF16 |
Unicode Transformation Format, a 16-bit encoding form designed to provide code values for over a million characters. UTF-16 can encode any of the Unicode characters. In UTF-16 encoding, characters are 2 bytes in length, except for supplementary characters, which take two 2 byte string units per character.
Note:
|
UTF32 |
Unicode Transformation Format, a 32-bit encoding form with a fixed-length encoding, in contrast to all other Unicode transformation formats, which are variable-length encodings. Each 32-bit value in UTF32 represents one Unicode code point and is exactly equal to that code point's numerical value.
Note:
|
ZD | (zoned decimal, signed). Each digit
of the decimal number is converted into its 8-bit EBCDIC representation.
The sign indicator replaces the first four bits of the low order
byte of the number. Example: -247 becomes
2 4 - 7 Decimal F2 F4 D7 Hexadecimal 11110010 11110100 11010111 Binary The number +247 becomes F2 F4 C7 11110010 11110100 11000111 Note:
|
PD | (packed decimal, signed). Each digit
of the decimal number is converted into its 4-bit binary equivalent.
The sign indicator is put into the rightmost four bits of the number. Example: -247 becomes
2 4 7- Decimal 2 4 7D Hexadecimal 00100100 01111101 Binary The number +247 becomes 247C in hexadecimal. Note:
|
PD0 | (packed decimal, with sign and first
digit ignored) The PD0 format can be represented as follows:
x is hexadecimal 0-F and is ignored.
d is hexadecimal 0-9 and represents a decimal digit. s is hexadecimal 0-F and is ignored. PD0 can be used for parts of PD fields. For example, in the PD field P'mmddyy' (hexadecimal 0mmddyyC), PD0 can be used separately for 0mmd (mm), mddy (dd) and dyyC (yy). |
FI | (fixed-point, signed).
The complete number is represented by its binary equivalent with the
sign indicator placed in the most significant bit position. 0 for
+ or 1 for -. Negative numbers are in 2's complement form.
|
BI | (binary unsigned). Any bit pattern. |
FL | ( hexadecimal floating-point,
signed). The specified number is in the two-part format of characteristic
and fraction with the sign indicator in bit position 0.
|
AQ | (character EBCDIC, with alternate collating sequence, unsigned). This is similar to format CH, but the characters collate according to the ALTSEQ (alternate collating sequence) table in effect. |
AC | (character EBCDIC, with ASCII collating sequence, unsigned). This is similar to format CH, but the characters collate according to the ASCII collating sequence. |
D1 | (EFS type). User-defined data type (requires an EFS program) |
D2 | (EFS type). User-defined data type (requires an EFS program) |
CSF or FS | (signed numeric with optional leading
floating sign). The floating sign format can be represented as follows: <s>d . . .d
s is an optional sign
immediately to the left of the digits d . . .d. If s is a -,
the number is treated as negative, otherwise it is treated as positive.
Thus, - must be used for a minus sign, but any other character
(for example, + or blank) can be used for a plus sign. The first non-decimal
digit (that is, not 0-9) going from right to left is treated as the
sign and anything to the left of the sign is ignored.
The types of data handled by the CSF or FS format encompass those produced by several different FORTRAN, PL/I and COBOL formats, such as those shown below (using a width of 4 for purposes of illustration): * FORTRAN: I4 ; G4.0 ; SP,I4 ; SP,I4.3 ; S,I4.3
* PL/I: F(4) ; P'S999' ; P'SSS9' ; P'---9' * COBOL: PIC ++9 ; PIC +999 ; PIC ++++ ; PIC ---9 ; PIC ---- ; PIC ZZZZ |
UFF | (unsigned free form numeric). This format extracts decimal digits (0-9) from right to left anywhere in the field to form a positive number. Any combination of characters is valid, but characters other than 0-9 are ignored. Examples:
|
SFF | (signed free form numeric). This format extracts decimal digits (0-9) from right to left anywhere in the field to form a positive or negative number. If - or ) is found anywhere in the field, the number is treated as negative, otherwise it is treated as positive. Any combination of characters is valid, but characters other than 0-9, - and ) are ignored. Examples:
|
CSL or LS | (signed number, leading separate
sign). This format refers to decimal data as punched into cards, and
then assembled into EBCDIC code. Example: +247 punched in a card becomes
+ 2 4 7 Punched numeric data 4E F2 F4 F7 Hexadecimal 01001110 11110010 11110100 11110111 Binary EBCDIC code -247 becomes - 2 4 7 Punched numeric data 60 F2 F4 F7 Hexadecimal 01100000 11110010 11110100 11110111 Binary EBCDIC code Note: A value with '-' as the leading sign character is
treated as a negative value. A value with any leading sign character
other than '-' (for example, '+' (plus) or blank) is treated
as a positive value.
|
CST or TS | (signed numeric, trailing separate
sign). This has the same representation as the CSL format, except
that the sign indicator is punched after the number. Example: 247+ punched on the card becomes
F2 F4 F7 4E Hexadecimal Note: A value with '-'
as the trailing sign character is treated as a negative value. A
value with any trailing sign character other than '-' (for example,
'+' (plus) or blank) is treated as a positive value.
|
CLO1 or OL1 | (signed numeric, leading overpunch
sign). This format again refers to decimal data punched into cards
and then assembled into EBCDIC code. The sign indicator is, however,
overpunched with the first decimal digit of the number. Example: +247 with + overpunched on 2 becomes
+2 4 7 Punched numeric data C2 F4 F7 Hexadecimal 11000010 11110100 11110111 Binary EBCDIC code Similarly -247 becomes D2 F4 F7 |
CTO or OT | (signed numeric, trailing overpunch
sign). This format has the same representation as for the CLO format,
except that the sign indicator is overpunched on the last decimal
digit of the number. Example: +247 with + overpunched on 7 becomes
F2 F4 C7 hexadecimal |
ASL | (signed numeric, ASCII, leading separate
sign). Similar to the CSL format but with decimal data assembled
into ASCII code. Example: +247 punched into card becomes
+ 2 4 7 Punched numeric data 2B 32 34 37 Hexadecimal 0101011 00110010 00110100 00110111 Binary ASCII code Similarly -247 becomes 2D 32 34 37 hexadecimal Note: A value with '-'
as the leading sign character is treated as a negative value. A value
with any leading sign character other than '-' (for example,
'+' (plus) or blank) is treated as a positive value.
|
AST | (signed numeric, ASCII, trailing
separate sign). This gives the same bit representation as the ASL
format, except that the sign is punched after the number. Example: 247+ becomes
32 34 37 2B hexadecimal Note: A value with '-'
as the trailing sign character is treated as a negative value. A
value with any trailing sign character other than '-' (for example,
'+' (plus) or blank) is treated as a positive value.
|
AUF | (ASCII unsigned free form numeric). This format
extracts decimal digits 0-9 specified in ASCII code (X’30’-X’39’) from right to left anywhere in the
field to form a positive number. Any combination of characters is valid, but characters other than
0-9 are
ignored. Examples:
|
ASF | (ASCII signed free form numeric). This format extracts
decimal digits 0-9 in ASCII code (X’30’-X’39’) from right to left anywhere in the field to form a
positive or negative number. If '-' or ‘)’ in ASCII code (X’2D’ or X’29’) is found anywhere in the
field, the number is treated as negative, otherwise it is treated as positive. Any combination of
characters is valid, but characters other than 0-9, '-' and ‘)’ are
ignored. Examples:
|
In the date formats below, unless specified otherwise, yy represents the two-digit year (00-99), ddd represents the day of the year (001-366), ccyy represents the four-digit year, mm represents the month (01-12), dd represents the day (01-31), x represents a decimal digit (0-9), s is hexadecimal 0-F and is ignored, and c represents the century indicator (c=0 is transformed to 19, c=1 is transformed to 20 and c>1 is transformed to 21).
Format | Description |
---|---|
Y2T, Y2W, Y4T, Y4W | (character or zoned decimal date
format with special indicators). The date field can be represented as follows: 3,Y2T: C'yyx' or Z'yyx'
4,Y2T: C'yyxx' or Z'yyxx' 5,Y2T: C'yyddd' or Z'yyddd' 6,Y2T: C'yymmdd' or Z'yymmdd' 7,Y4T: C'ccyyddd' or Z'ccyyddd' 8,Y4T: C'ccyymmdd' or Z'ccyymmdd' 3,Y2W: C'xyy' or Z'xyy' 4,Y2W: C'xxyy' or Z'xxyy' 5,Y2W: C'dddyy' or Z'dddyy' 6,Y2W: C'mmddyy' or Z'mmddyy' 7,Y4W: C'dddccyy' or Z'dddccyy' 8,Y4W: C'mmddccyy' or Z'mmddccyy' The special indicators are X'00...00' (BI zeros), X'40...40' (blanks), C'0...0' (CH zeros), Z'0...0' (ZD zeros), C'9...9' (CH nines), Z'9...9' (ZD nines) and X'FF...FF' (BI ones). |
Y2U, Y2V, Y2X, Y2Y, Y4U, Y4V, Y4X, Y4Y | (packed decimal date format with
special indicators). The date field can be represented as follows: 2,Y2U: P'yyx' (X'yyxs')
3,Y2V: P'yyxx' (X'0yyxxs') 3,Y2U: P'yyddd' (X'yyddds') 4,Y2V: P'yymmdd' (X'0yymmdds') 4,Y4U: P'ccyyddd' (X'ccyyddds') 5,Y4V: P'ccyymmdd' (X'0ccyymmdds') 2,Y2X: P'xyy' (X'xyys') 3,Y2Y: P'xxyy' (X'0xxyys') 3,Y2X: P'dddyy' (X'dddyys') 4,Y2Y: P'mmddyy' (X'0mmddyys') 4,Y4X: P'dddccyy' (X'dddccyys') 5,Y4Y: P'mmddccyy' (X'0mmddccyys') The special indicators are P'0...0' (PD zeros) and P'9...9' (PD nines). |
Y2C or Y2Z | (two-digit, two-byte character or
zoned-decimal year data). The two-digit year data can be represented
as follows: xyxy
y is hexadecimal 0-9 and represents
a year digit. x is hexadecimal 0-F and is ignored. Thus, 96 might be represented as hexadecimal F9F6 (character 96) or as hexadecimal F9C6 or 0906 (zoned decimal 96). |
Y2P | (two-digit, two-byte packed-decimal
year data). The two-digit year data can be represented as follows:
xyyx
y is hexadecimal 0-9 and represents a year
digit. x is hexadecimal 0-F and is ignored. Thus, 96 might be represented as hexadecimal 096F or 896C (packed decimal 96). |
Y2D | (two-digit, one-byte decimal year
data). The two-digit year data can represented as follows: yy
y
is hexadecimal 0-9 and represents a year digit. Thus, 96 would be represented as hexadecimal 96 (decimal 96). |
Y2S | (two-digit, two-byte character or
zoned-decimal year data with special indicators). The two-digit year data can represented as follows: xyxy
y is hexadecimal 0-9 and
represents a year digit. x is hexadecimal 0-F and is ignored. Thus, 96 might be represented as hexadecimal F9F6 (character 96) or as hexadecimal F9C6 or 0906 (zoned decimal 96). The special indicators can be represented as follows: qxzx
qx is hexadecimal 00,
40 or FF. zx is hexadecimal 00-FF (although typically 00, 40 and
FF).
Thus, special indicators might be hexadecimal 0000, 0005, 4040, FFFF, FF85 and so on. |
Y2B | (two-digit, one-byte binary year
data). The binary year data can be represented as follows: hh
hh
is the hexadecimal equivalent of a decimal yy value as follows:
Thus, 96 might be represented as hexadecimal 60 (decimal 96) or C4 (decimal 196). |
DT1 | (SMF date interpreted as Z'yyyymmdd'). A 4-byte SMF date value in the form P'cyyddd' (X'0cyydddF') is converted to a Z'yyyymmdd' value. |
DT2 | (SMF date interpreted as Z'yyyymm'). A 4-byte SMF date value in the form P'cyyddd' (X'0cyydddF') is converted to a Z'yyyymm' value. |
DT3 | (SMF date interpreted as Z'yyyyddd'). A 4-byte SMF date value in the form P'cyyddd' (X'0cyydddF') is converted to a Z'yyyyddd' value. |
DC1 | (TOD date interpreted as Z'yyyymmdd'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'yyyymmdd' value. The STCKCONV macro is used to do the conversion. |
DC2 | (TOD date interpreted as Z'yyyymm'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'yyyymm' value. The STCKCONV macro is used to do the conversion. |
DC3 | (TOD date interpreted as Z'yyyyddd'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'yyyyddd' value. The STCKCONV macro is used to do the conversion. |
DE1 | (ETOD date interpreted as Z'yyyymmdd'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format, is converted to a Z'yyyymmdd' value. The STCKCONV macro is used to do the conversion. |
DE2 | (ETOD date interpreted as Z'yyyymm'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format is converted to a Z'yyyymm' value. The STCKCONV macro is used to do the conversion. |
DE3 | (ETOD date interpreted as Z'yyyyddd'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format is converted to a Z'yyyyddd' value. The STCKCONV macro is used to do the conversion. |
In the time formats below, unless specified otherwise, hh represents the hour (00-23), mm represents the minutes (00-59), ss represents the seconds (00-59), and xx represents hundredths of a second (00-99).
Format | Description |
---|---|
TM1 | (SMF time interpreted as Z'hhmmss'). A 4-byte binary SMF time value in hundredths of a second is converted to a Z'hhmmss' value. |
TM2 | (SMF time interpreted as Z'hhmm'). A 4-byte binary SMF time value in hundredths of a second is converted to a Z'hhmm' value. |
TM3 | (SMF time interpreted as Z'hh'). A 4-byte binary SMF time value in hundredths of a second is converted to a Z'hh' value. |
TM4 | (SMF time interpreted as Z'hhmmssxx'). A 4-byte binary SMF time value in hundredths of a second is converted to a Z'hhmmssxx' value. |
TC1 | (TOD time interpreted as Z'hhmmss'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'hhmmss' value. The STCKCONV macro is used to do the conversion. |
TC2 | (TOD time interpreted as Z'hhmm'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'hhmm' value. The STCKCONV macro is used to do the conversion. |
TC3 | (TOD time interpreted as Z'hh'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'hh' value. The STCKCONV macro is used to do the conversion. |
TC4 | (TOD time interpreted as Z'hhmmssxx'). The 8 bytes of an input clock value, in the basic time-of-day (TOD) format, is converted to a Z'hhmmssxx' value. The STCKCONV macro is used to do the conversion. |
TE1 | (ETOD time interpreted as Z'hhmmss'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format, is converted to a Z'hhmmss' value. The STCKCONV macro is used to do the conversion. |
TE2 | (ETOD time interpreted as Z'hhmm'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format, is converted to a Z'hhmm' value. The STCKCONV macro is used to do the conversion. |
TE3 | (ETOD time interpreted as Z'hh'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format, is converted to a Z'hh' value. The STCKCONV macro is used to do the conversion. |
TE4 | (ETOD time interpreted as Z'hhmmssxx'). The first 8 bytes of an input clock value, in the extended time-of-day (ETOD) format, is converted to a Z'hhmmssxx' value. The STCKCONV macro is used to do the conversion. |
- 1
- The overpunch sign bit is always 'C' for positive and 'D' for negative.