IBM MTM 2018: Part Two – Challenge #15

I’m at the milestone! I’m at the last part two challenge. This is a challenge that requires me to dig up all my previously acquired mainframe knowledge to solve this challenge. I need to navigate 4 different types of data sources, find a number that’s encoded in one of three encoding types and calculate the sum of those numbers.

At first I thought I needed to write code that would access each data source and get that number but I just need to physically read it and write it down on a notepad or something.

Number Hunt

IBM Master the Mainframe Part Two – Challenge #15

The 4 data sources include:

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

Each number may be in 1 of 3 formats:

  2. ASCII
  3. Packed Decimal

So now you know. I won’t be given the data format in which the data is in. I’ll have to figure it out myself when I see it. I’ll post screenshots of my progression but I’ll blur my solutions. Sorry for that! Just remember, if I can do it… you can too!

I need to sum the 8 numbers found in the specified record and column positions from the following data sources:

Data Set Name Z#####.HUNT1
  #1 Record 14 Column 35 to 38
  #2 Record 18 Column 78 to 80

Data Set Name Z#####.HUNT2 Member Name FRED
  #3 Record 7 Column 1 to 3
  #4 Record 9 Column 47 to 49

Unix File Name /z/z#####/dennis
  #5 Record 6 Column 42 to 45
  #6 Record 11 Column 31 to 33

  #7 Column PHONENO where lastname is YAMAMOTO
  #8 Column BONUS where lastname is YAMAMOTO

Then I need replace 0000 on the last line in Z#####.JCL(P2DONE) and execute it.


Record 14 Column 35 to 38 and Record 18 column 78 to 80 contain a number. The number at record 14 is invisible? Let’s put hex on as we did in Challenge #08. Now we can see EBCDIC characters.


These characters have to be decoded to a number.

If I’m right, those characters appear to be ASCII character bytes. These are really easy to decode. Now on to the next line, these numbers are not visible. They are more to the right. Could’ve guessed, they’re in a different format.

I have the numbers, do you?


Inside member name FRED we need to find numbers at Record 7 Column 1 to 3 and Record 9 column 47 to 49. All data should be visible without shifting.

Observe the red marks. I’m not sure what Record 9 Column 47 to 49 is supposed to be. But Record 7 is easy, same as previous hunt.

I found out what Record 9 was, it’s a tricky one. Goodluck!


Remember Challenge #13? This is basically the same. Remember, lowercase!

Again everything should be visible. Now just hex on and let’s decode some characters! The first one at column 6 is easy. Column 11 is also easy, nothing we haven’t seen yet!


Let’s exit ovms and write some SQL. Again some DB2 interaction, finally! Same as Challenge #14.

I wrote the select where statement and got this result. Sorry for the censor! Now I have all the numbers 🙂


This was fun and challenging. Let’s edit JCL(P2DONE) and fill in the numbers!


Successful completion of P2DONE writes the answer to P2.OUTPUT(#15) and deletes data sources.

The data sets are gone! I got the number right!

Completing Part 2

I’m really curious, did I make any mistakes? Did I delete someone else’s database? Did I crash IBM’s server with my select * query? Let’s run TSO SCOREP2 and see how I did!

Oh my god! Let’s check STATUS!

YES!! I am now officially a part 2 finisher!

I’ve 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

What a list I say!

Part 3

We need to have a chat about Part 3. I was told that I can’t publish part 3 solutions. And I won’t. I’ll try to write interesting blogs about my route through part 3, post some snippets but stay vague enough that you’d still have to do the hard work if you’re participating in IBM’s MTM challenge.

I’d like to thank everyone for checking out out my blog this far. I’ve been blogging for about a month and it’s been keeping me motivated for just about everything. I quit programming after work before I was doing the MTM challenge. Now I’m all up and running again, staying healthy and motivated.

What’s been keeping you running, healthy and motivated?

22 thoughts on “IBM MTM 2018: Part Two – Challenge #15

  1. Hi Kevin!
    I completed Part 2, but have not received the badge yet. Do you have an idea of how many days it takes to receive it?

  2. Hello Kevin,
    I completed Part 2 yesterday and discovered that 2,3,6,7,9 were scored as incorrect. I have tried to fix these all day today with no improvement. These challenges seem to be the easier ones and I have no idea what I’m doing wrong. Any advice?

    Also, what percentage have to be scored as correct in order to earn the badge?


    1. Hello Anonymous, I would advise you to just try and do those challenges again very slowly. Maybe read my blogs together with the IBM assignment and try to find out where you went wrong, step by step.

      I do believe that you need to pass all part two exercises to gain the part two badge. I think only part three has a point system where they score your solutions.

      – Merry Christmas, Kevin.

  3. thank you kevin i really appreciate, part two done and dusted.

    Quick question though, how does it feel like being a part 3 finalist? And what’s the next thing you are planning on doing?

    1. Hi Isaac, congratulations on finishing part two 🙂

      Finishing part 3 feels good, the blog really kept me motivated and it’s fun knowing people actually read them haha. The next thing? We can use the mainframe up to Aug 31, 2019. My goal is to learn how to use languages like Java, Cobol and Rexx on this system and gain experience. I’ll definitely also participate in MTM 2019 🙂

      What about you?

        1. Not correct, should be more than 4000. Just write it out and recalculate. 2468+512+256+(-)1999+1983+(-)2007+2890+500=? How do you get 2869? I’m not too sure about my number now, I don’t have the data set anymore.
          – Kevin

    1. Hi Anonymous, 152 is a packed decimal if I remember correctly; you’re right but the numbers are in the wrong order. I no longer have access to these databases, so I’m afraid I can’t help more. – Kevin

      1. I got following numbers, but I made a mistake somewhere:
        1. 2468+0
        2. 256+19
        3. 1983+20
        4. 2890+500

        Sum of these eight numbers is 8136.

Leave a Reply

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