IBM MTM 2019: Part Two – Challenge #08


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 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 as primary command.
  2. as line command next to the data set.
  3. s EBCDIC as primary command.
  4. copy ‘’ 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 ‘’ 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 ‘’ 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!

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

  1. Hi,

    for those who, like me, didn’t got why 4096 is in 3 bytes, on table 3, we see the following: the last 4 bits (that should be in a byte) should contain the sign.
    4096+ is taking 5 caracters, but we need to be on 6 to match sentence above
    04096+ works!
    another explanation that seems way more clear for me:
    According to last IBM documentation, F means +, D means –
    so, to avoid using non standard numbers, solution may be :

    1. I have ‘[‘ where A used to be (I have used [4,1] for A in ASCII)
      ****** ***************************** Top of Data ******************************
      000001 0123456789
      000002 [
      000003 :
      000004 %
      ****** **************************** Bottom of Data ***************************

  2. hello everyone… i mess up in exercise 8.. but i manage to show you guys how i delete the member files without delete the other file
    you go to ispf then type 3.4
    then enter,
    then put / on the left side of the z#### name
    then choose a member you wanted to delete.

  3. Hi there, TSO SCOREP2 doesn’t work with me.

    34 +++ lastmbr = sysmembers + 6
    3 +++ call set_member_values
    Error running SCOREP2, line 34: Bad arithmetic conversion

    I don’t know how else I can check my progress.

    1. EDIT: after seeing the REXX code of SCOREP2 in the CLIST library, I saw the problem, just in case it happens to anyone else.
      I always execute the command TSO PROFILE NOPREFIX to remove my user from my default prefix, in order to avoid the quotation marks when I want to prefix something else that doesn’t start with my USER. SCOREP2 wants to read the files with getting our USER as the default prefix.
      To solve to problem I just execute the opposite command, TSO PROFILE PREFIX, and typed my user when they asked me for the prefix.
      Thanks and sorry for the inconvenience.

  4. hello Kevin ,can you tell me how can i restart #08, becouse of i am not getting 4 rows where i can write A,Z, and ………..i am getting only 3 rows?Please help me?


    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

      Kind regards,
      – Kevin

  6. 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!

  7. 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,

  8. 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!

  9. Hi,
    The problem I found is the BCD number, because:
    I made:
    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 !

  10. 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?

  11. 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].


Leave a Reply

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