z/OS Facilities for working with ASCII and Packed Decimal DataISPF Editor
HEX ON/OFF (primary command) - hexadecimal values displayed vertically
HX (line command) - hexadecimal values displayed vertically for the line
TN3270 Unix shell prompt
oedit (ISPF Editor for Unix files with HEX and HX facilities
viascii - vi enhanced to convert between ASCII and EBCDIC
Working with Unix files is Unix command - chtag
set, modify, remove, or display information in a file tag.
read and write of text is converted between ASCII (ISO8859-1) and EBCDIC (IBM-1047)
when unix filename clients is ASCII
chtag -t -c ISO8859-1 clients
EBCDIC and ASCII vertical hexadecimal representation of displayable characters
Example: lower case character a is x'81' EBCDIC and a is x'61 ASCII
Binary Coded Decimal (BCD) and Packed Decimal representation
Packed Decimal Examples - vertical representation
ISPF edit view of packed decimal is typically unprintable field
Requires HEX ON to view packed decimal value
What is a bit, nibble, and byte?
bit = either 0 or 1
nibble = 4 bits --- a nibble could be 1111 or a nibble could be 0000 or any other combination, e.g. 0001, 0010, ...
byte = 8 bits or 2 nibbles --- 1111 0000 represents 1 byte and 2 nibbles
EBCDIC lowercase ( a ) = 2 bytes - hexadecimal x'81'
EBCDIC lowercase ( a ) = 4 nibbles - where 8 is a bit nibble of 1000 and 1 is a bit nibble of 0001
EBCDIC lowercase ( a ) = 16 bits (1111 0001) where 8 is first bit nibble of 1000 and 1 is second bit nibble of 0001
ASCII lowercase ( a ) = 2 bytes - hexadecimal x'61'
ASCII lowercase ( a ) = 4 nibbles - where 6 is first bit nibble of 0110 and 1 is second bit nibble of 0001
ASCII lowercase ( a ) = 16 bits - (0110 0001) - where 0110 is first nibble and 0001 is second nibble