IBM MTM 2019: Part Two – Challenge #08

Hello!

This challenge is a bit the same as last year except it has a few more data types to learn. Bits, Nibbles, Bytes, Hexadecimal, EBCDIC, ASCII, and BCD. Last year we didn’t learn about Nibbles (4-bits) or BCD. Time for something new!

z/OS its default encoding is EBCDIC. EBCDIC stands for Extended Binary Coded Decimal Character Interchange Code. It’s an 8-bit-standard way to store letters and punctuation marks. Here is a handy EBCDIC table.

In each table cell above, the first row is an abbreviation for a control code or (for printable characters) the character itself; and the second row is the Unicode code (blank for controls that don’t exist in Unicode).

You can read what IBM wrote about EBCDIC on mtm2019.mybluemix.net. I won’t explain the character formats on this blog as IBM already does on the challenge page itself.

EBCDIC Character Encoding

IBM Master the Mainframe 2019 Part Two – Challenge #08

We need to edit Z#####.PDS.DATA and make a new member called EBCDIC. Then we need to copy a data set into it and change the way we view the file.

  1. dslist pds.data as primary command.
  2. as line command next to the data set.
  3. s EBCDIC as primary command.
  4. copy ‘zos.mtm2019.public.shared.data(ebcdic)’ as primary command inside EBCDIC member.
  5. hex on as primary command.
  6. cols as primary command.

This is what I see. We don’t have to do anything yet. Now let’s go back to our data set and create the next member. Press F3.

ASCII Character Encoding

Still inside PDS.DATA we create a new member ASCII and copy some data into it.

  • s ASCII as primary command.
  • copy ‘zos.mtm2019.public.shared.data(ascii)’ as primary command.
  • hex on ; reset ; as primary command.
  • source ascii as primary command.
  • cols line command at 000004.

This is what I see. Now I will enter the primary command reset to reset my view and enter the primary command cancel to cancel my changes.

BCD and Packed Decimal Character Encoding

Again in PDS.DATA we will create a new data member called packed and copy some data into it.

  • s packed as primary command.
  • copy ‘zos.mtm2019.public.shared.data(packed)’ as primary command inside edit mode of the member packed.

This is what I get. Let me first reset and then do the following.

  • Overtype line 5 with cols
  • Overtype line 6 with hx
  • Overtype line 9 with hx
  • Overtype line 12 with hx

This is the result. Looks good! Let’s cancel and select a new member so we can solve this challenge using cancel ; s #08 as primary command.

Complete the Challenge

IBM wants us to type a few things.

  1. Do not press enter key until explicitly reading ‘now press enter key’
  2. Tab to first empty line and type 0123456789
  3. Tab to second empty line and type uppercase A
  4. Tab to third empty line and type lowercase z
  5. Tab to forth empty line and type number 4096
  6. Now press enter key

Let’s enable the hex view using hex on primary command to see what we are dealing with.

Change member #08 as follows:

  1. Change line 2 column 1 from EBCDIC uppercase A to ASCII uppercase A
  2. Change line 3 column 1 from EBCDIC lowercase z to ASCII lowercase z
  3. Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096
    Line 4 – Packed Decimal 4096 will leave column 3 unused
    Line 4 – Change column 3 to x’40’, an EBCDIC space

Hmm, seems very complicated! Let’s see what I can do. I will use an array to display the changes I make. With the first element inside the array being the hexadecimal high order byte and the second element being the hexadecimal low order byte.

Change line 2 column 1 from EBCDIC uppercase A to ASCII uppercase A

We see that uppercase A in EBCDIC is [C,1]. In ASCII uppercase A is [4,1]. So let’s change that!

Change line 3 column 1 from EBCDIC lowercase z to ASCII lowercase z

Again we can consult the table above. z in EBCDIC is [A,9]. In ASCII lowercase is [7,A].

Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096

4096 EBCDIC to 4096 packed decimal is easy. [04,09,6D] will be the new number.

I have changed the other column to [4,0] so it becomes a space.

Copying to P2.OUTPUT

This is what my copy looks like.

I feel like this should be correct. Let’s overtype 000001 with line command c99 and then issue the primary command rep p2.output(#08).

I’m too curious! I’ll just run TSO SCOREP2 primary command to see if what I have is correct.

It’s correct! Phew, this was a hard one!

25 thoughts on “IBM MTM 2019: Part Two – Challenge #08

  1. HELLO , THANKS FOR ALL YOUR BLOGGING IT HELPS ALOT , SO I HIT A SNAG BECAUSE I ACCIDENTALLY DELETED MY PDS.DATA SECTION AND NOW I CANT COMPLETE CHALLENGE 8 OR 9 OR 10 OR 11 OR 12 LOL IM HOPING YOU KNOW OF A SOLUTION for this 🙁

    1. Hi Anonymous

      Holy schnitzel, do you still have Z#####.PDS.DATA in your DSLIST?

      Originally PDS.DATA only has 4 members: BINARY, COUNTRY, FUN and Z. The rest of its contents was generated by challenges. I’m afraid you’ll have to figure out which challenges that were and do them again if necessary. I don’t know how to create a data set itself.

      What I do know, if you still have PDS.DATA. You can always get fresh copies from ZOS.MTM2019.PUBLIC. So create a new member (s BINARY) called BINARY and COPY ‘ZOS.MTM2019.PUBLIC.PDS.DATA(BINARY)’ into it. Do this also for the other three members.

      If you want to get more help with this issue, please ask the official support Slack at https://masterthemainframe18.slack.com/.

      Kind regards,
      – Kevin

  2. Hi Kevin, I’m doing the MTM 2019 as well and I have a doubt:
    the challenge says “Line 4 – Packed Decimal 4096 will leave column 3 unused”, but I don’t see how it can happen. I would have done it like you did, do you have any thoughts about that?
    I’ll subscribe to the blog I didn’t think there was someone blogging about this and it’s great!
    -Matteo

  3. Hey im stuck on the part where you say
    “This is what I get. Let me first reset and then do the following.”

    Overtype line 5 with cols
    Overtype line 6 with hx
    Overtype line 9 with hx
    Overtype line 12 with hx

    my screen still looks like the first figure under BCD and Packed Decimal Character Encoding

    1. Let me rephrase the question.
      Under the first step of: BCD and Packed Decimal Character Encoding
      How do i Reset my page so that all the numbers are deleted except line 6, 9, and 12, where my screen looks like the screenshot below the instructions of
      Overtype line 5 with cols
      Overtype line 6 with hx
      Overtype line 9 with hx
      Overtype line 12 with hx

        1. Hi Vinh

          I executed the primary command ‘reset’ so the view would reset to the one without the HEX view. I put reset in bold as an indicator of a command, it’s not that clear; that’s my bad.

          Does this help?

          Kind regards,
          Kevin

  4. Hello Do I have to have all of Part Two completed in order to view my progress?
    It will not let me use TSO SCOREP2 and I have only finished up to P2 C8. Thank you!

  5. Hi,
    The problem I found is the BCD number, because:
    006
    49D
    I made:
    49A
    060
    what is wrong!
    In the case of positive BCD number you can use A, C, E or F.
    If you use the D for negative it’s okay as well for the exercise, curious !
    Georges

  6. Correct me if I’m wrong, but when you “Change line 4 columns 1-4 from EBCDIC 4096 to Packed Decimal 4096” you change it to [04,09,6!!!D!!!]. Shouldn’t it be 04096!!!A!!! like in Figure #9?

  7. Hello. In Challenge # 08 I have redone it several times, in p2.output it seems to be ok, but in status … still appears as Incorrect. Help me please. Thank you very much in advance.

            1. Hello Kevin,
              problem is in that line: “4096 EBCDIC to 4096 packed decimal is easy. [04,09,6A] will be the new number” it should contains [04,09,6D].

              Akos

Leave a Reply

Your email address will not be published. Name, email and website not required.