Just a Bit
Part Two - Challenge #08

Background:

You will learn about bits, bytes, hexadecimal, EBCDIC, and ASCII

There are 10 kinds of people in the world. Those who understand binary and those who don't.
If you are unfamiliar with the humor in the above statement, then you will be after this challenge.

Early school education involves decimal arithmetic and script symbols for alphanumeric and special characters.

Computer technology expertise requires an adjustment to the early school education.


Useful information about bits, bytes, hexadecimal, EBCDIC, and ASCII to help complete challenge

The digital world of computers, networks and many electronic devices operate using signals
where a signal at the lowest level is either off (0) or on (1).

The word binary involves two things. Binary, 0 or 1, is the lowest level of our digital world.
Computer instructions, alphanumeric and special characters are binary at the lowest level.

The word bit is used to store only 1 of 2 possible states. A binary bit is either state 0 or 1.
Think of a light switch with only 2 states, off (0) or on (1).

A more human friendly method to represent a defined string of bits is hexadecimal.
Hexadecimal has 16 positions (0-9 and A-F representing positions 10-15).

Two different character format schemes are

  1. EBCDIC, Extended Binary Coded Decimal Interchange Code
  2. ASCII, American Standard Code for Information Interchange
z/OS default is EBCDIC but can store and process ASCII

  • z/OS default is EBCDIC data format for character representation.
  • z/OS can store and process ASCII data format, but ASCII is not the default.
  • What is common between EBCDIC and ASCII is hexadecimal
      - Hexadecimal values are used for both EBCDIC and ASCII characters.

References drop down includes a Character Encoding Summary with Hexadecimal format
for each displayable EBCDIC and ASCII character

-- Observe the displayed lowercase a in the table as EBCDIC x'81' and ASCII x'61'
Character Encoding Summary


Challenge:

Use ISPF Editor to view and modify EBCDIC and ASCII hexadecimal values

ISPF editor has capabilities to explore hexadecimal, EBCDIC, and ASCII

  1. Edit Z#####.PDS.DATA member name MIX
      - Only lines 000001 and 000003 are readable
  2. Enter ISPF edit primary command source ascii
      - Only lines 000002, 000004, 000005, and 000006 are readable
  3. Enter ISPF edit primary command reset
      - Again, only lines 000001 and 000003 are readable
  4. Enter ISPF edit line command cols on line 000001
  5. Enter ISPF edit primary command hex on
      - Hexadecimal values for each character are visible directly below the character
      - Line 000001 - column 1 is an EBCDIC uppercase T
       - Below T on line 000001 is E and below E is 3
       - EBCDIC uppercase T is hexadecimal x'E3' where x means hexadecimal
  6. Enter ISPF edit primary command source ascii
      Line 000002 - column 1 is an ASCII uppercase T
      Below T on line 000002 is 5 and below the 5 is a 4
      ASCII uppercase T is hexadecimal x'54' where x means hexadecimal

Z#####.PDS.DATA member name MIX requires 3 modifications to successfully complete the challenge.

  1. The word binary is misspelled on line 000004 and 000005.
    Correct the spelling.
      - Correction can be accomplished any 1 of 3 ways
      1) Overtype the hexadecimal value with correct value for the misspelled letter
      2) While in source ascii mode, overtype the incorrect letter with the correct letter
      3) Primary command change can correct each occurrence of the misspelled word
  2. Decode "packed decimal" value on line 000007 located in columns 1-3
      What is "packed decimal"?
      1) See table at the bottom of Reference - Character Encoding Summary
      2) Internet research of "packed decimal" format
  3. Enter the decoded "packed decimal" value in EBCDIC format in the line 000008 text area columns 1-5 and the sign character (+ or -) in column 6

Create P2.OUTPUT(#08) from successfully modified Z#####.PDS.DATA(MIX)

  • Overtype line 000001 with c8 to copy 8 lines
  • Enter primary command replace p2.output(#08)

NOTE: ISPF primary command cancel is available to exit edit session without saving changes in the event you want to start over.


Congratulations! You are done with challenge #08 and you ready for the next challenge.

Next: Challenge #09