IBM MTM 2019: Part Two – Challenge #15


This is probably the hardest part 2 challenge. That’s probably why it’s the last one. Ahh, what am I saying? Shouldn’t we get to work? I’ve been getting a lot of e-mails and contact form submissions for this post so I’ll try my best to make this blogpost as clear as possible.

Maybe something less interesting, but I’ve sped up my blog by removing some sharing buttons and other useless plugins. Hazah for a less bloated experience!

Number Hunt

IBM Master the Mainframe 2019 Part Two – Challenge #15

For this challenge we need to gather several numbers which can be positive or negative and get its sum. These numbers have to be fetched from a variety of different data sets. Last time in 2018  didn’t post the numbers whilst I was actually allowed to post the answers. I’ll do it differently and post the numbers, I don’t see any reason not to.

These are the data set types we’re going to explore for numbers:

  1. Sequential Data Set Name
  2. Partitioned Data Set Member Name
  4. Unix File Name
  5. DB2 Table

Each number may be in any of the following 3 formats:

  2. ASCII
  3. Packed Decimal

IBM furthermore describes some of the possible actions required to get to these numbers.

Locate, identify, and sum 6 numbers from 5 unique z/OS data sources

First of all we need to sumbit a primary command from the ISPF Primary Option Menu. Now, I know we specifically don’t have to do it there, it just feels more right to do it from there. Let’s begin by issuing tso submit ‘zos.public.jcl(p2final)’ to get all the required data sets.

We now have the following data sets followed by the number its location:

  • Data Set Name Z#####.HUNT1
    #1 Record 10 Column 12 to 15
  • Data Set Name Z#####.HUNT2 – member name HUNT2
    #2 Record 3 Column 1 to 2
  • VSAM Data Set Name Z#####.HUNT3
    #3 Record 1 Column 13 to 15
  • Unix File Name /z/z#####/hunt4
    #4 Record 2 Column 18 to 21
    #5 Record 5 Column 1 to 2
    #6 Column PHONENUMBER where EMPLOYEENUMBER = ‘200140’

Character Encoding Summary


Now, let’s navigate to our HUNT1 data set and see what’s in it. There’s supposed to be a number at line 10 column 12 to 15. Let me put hex on and cols to see if I can spot something at that line.

Look what I found! 1923. But what data type is that? According to the table above it is just normal ASCII.


Now, let’s navigate to our HUNT2 data set, member name HUNT2 and see what’s in it. There’s supposed to be a number at line 3 column 1 to 2. Don’t forget to put hex on, maybe reset to get rid of the annoying notice and put cols on.

Now this is obviously a packed decimal. 454B. What does that exactly mean? We also have to convert it to a number we can use in our calculation. Let’s take a look at the packed decimal table.

So we have the number 454 and the sign digit BB is in this case a negative sign digit. Which means we have the number -454.

VSAM Data Set Name Z#####.HUNT3

Now now, VSAM, how do I get there again? Aha via the file manager! Let’s enter F.2 from the ISPF Primary Option Menu.

Now we need to access HUNT3.

It first said VSAM.ESDS, I just changed that to HUNT3 and pressed enter. Set the editor format to HEX.

Now we have to find a number at line 1 column 12 to 15.

It says 01914C. This is again, a packed decimal. The packed decimal sign digit is C which means that the number is positive. So we have +1914.

Unix File Name /z/z#####/hunt4

Now we need to go back to OMVS to edit hunt4. This can be done by returning to the, you’ve guessed it, ISPF Primary Option Menu and issuing TSO OMVS primary command.

We are now in our UNIX environment. Inhere, we have the file hunt4. Let’s edit it using the command oedit hunt4.

We have to find two numbers. The first is at line 2 column 18 to 21 and the second is at line 5 column 1 to 2.

Two different data types. 015F is a packed decimal and 2004 is normal ASCII. 15 is the number and has to be a positive sign digit. 2004 is… well, 2004. Press F3 and type exit in the OMVS command line to return to the ISPF Primary option menu.


We need to get the phonenumber of a specific employee. We can honestly look back to challenge #14 and do the same query except we use a different employeenumber. IBM says: PHONENUMBER where EMPLOYEENUMBER = ‘200140’. The query is select phonenumber from ibmuser.vphone where employeenumber = ‘200140’; I suppose.

Let’s issue the primary command d2 from the ISPF Primary Option Menu, then enter 1 as primary command in the DB2I PRIMARY OPTION MENU. In the SPUFI screen we let everything as is and press enter twice.

I have changed the employeenumber of our previous query. This will not invalidate the solution to part 14 as the result is already copied to P2.OUTPUT(#14). No worries! After editing, press F3 and enter to execute to get the output.

This employee’s phonenumber is 1793. That’s out last number.


So we have all our numbers:

  • +1923
  • -454
  • +1914
  • +15
  • +2004
  • +1793

We need to take the sum. 1923-454+1914+15+2004+1793=7195. No witty number this time IBM? Or am I wrong?

Actions to complete challenge successfully

Now let’s navigate to Z#####.JCL member name P2DONE and replace the 0000 with our number.

Let’s submit this and check P2.OUTPUT(#15).

It’s there! Hopefully I’m right 🙂

Completing Part 2

Let’s enter the primary command TSO SCOREP2 from the ISPF Primary Option Menu and navigate to P2.STATUS afterwards to see if all our challenges are complete!

Now let’s navigate to P2.STATUS.

Everything is correct! YAY!

Note: my output is blue because I entered the line command for browse.

Together we have gained experience in:

  • TN3270 Emulator
  • TSO, Time Sharing Option
  • ISPF, Interactive Productivity Facility
  • ISPF Editor
  • SDSF, System Display and Search Facility
  • Hexadecimal, EBCDIC, ASCII, and Packed Decimal
  • JCL, Job Control Language
  • Sequential and Partitioned Data Sets
  • VSAM Data Sets
  • IDCAMS Utility Program
  • Unix System Services and Unix Files
  • DB2 SQL

When do I get the badge?

Expect to receive it within the next 2 weeks. Yes, it might or might not take that long.

Did you like this challenge?

I liked it! Some may see this as an annoying challenge because it’s rather hard and long, but this challenge actually requires you to navigate to all sorts of places, work with all sorts of data sets and read all sorts of data types!

You should be proud of finishing this challenge, are you?

17 thoughts on “IBM MTM 2019: Part Two – Challenge #15

  1. Hello there, my TSO SCOREP2 command gives me this message:
    “Results of your Part 2 work will be in Zxxxxx.STATUS

    If results in Zxxxxx.STATUS show any challenge status
    as Incorrect, then you may attempt that challenge again.
    Enter SCOREP2 after attempting correction

    View data set Zxxxxx.STATUS for your results ”
    is that normal ?

    1. Hi Henrique

      That is perfectly normal, they are just saying you can view your results for part two in the mentioned data set. See paragraph “Completing Part 2” of this blogpost.

      Kind regards,
      – Kevin

  2. Hi Kevin,
    All part 2 DONE!
    I promise I did not cheating, only taking a look when something was not clear for me.
    I will begin the part 3 tomorrow.
    Thank you!

    1. Hi Koina

      Because I work full time it will probably take a long time before I release the entire part 3. I can’t guarantee a timeframe for the releases.

      Kind regards,
      – Kevin

    1. Hi Akos

      Thanks for the kind words!

      For now I have not written about any topics other than mainframes. I classify myself as a junior programmer and I don’t think I can write something that really contributes to our community.

      Whenever I feel confident I definitely will!

      Kind regards,
      – Kevin

Leave a Reply

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