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?

IBM MTM 2019: Part Two – Challenge #14


Yes yes, I’m late! But I’m here to help you finish challenge #14, right now. There’s a couple of things I have to say about this post, I have recorded some configuration work because there’s a lot of screenshots on the official assignment page. I advise you to just follow the mybluemix page for the first 2 steps.

Ooh btw, this is my 50th blogpost!


IBM Master the Mainframe 2019 Part Two – Challenge #14

Configure Db2 Interactive ISPF Panel

There are a lot of screenshots on the official page but for everyone that needs it, I made a quick sloppy video displaying the few steps. You could call me lazy, but it’s in my opinion better than posting the same 10 screenshots IBM has. Everytime I go back or you don’t see me type, I either press F3 or ENTER.

SQL Processor Using File Input, SPUFI

The same goes for this part.

Edit, modify, and execute a fourth SQL statement in Z#####.PDS.DATA(SQL)

Back to being a text only blog! This assignment is very easy, we need to select only the phonenumber column from table vphone owned by ibmuser where employeenumber is ‘200220’. That’s very basic SQL.

So, what goes through my mind is select phonenumber from ibmuser.vphone where employeenumber = 200220. I’m not sure if there’s quotes needed as it’s a number. But i’ll go ahead and try with quotes as IBM went through the trouble to add quotes themselves.

Now go back to where we edited the SQL, just like before. From the ISPF options menu, d2, d, enter, 1, enter. Something like that. You can enter a new line by issuing the line command i1 at line 000003.

This is what I have, I’ll save and go back with F3 and then press enter to submit.

That’s a short phone number? Let me select * from ibmuser.vphone to see if I’m actually correct. (You don’t have to do this.)

Alright, it looks like those phonenumbers are indeed that short. It probably are internal phone numbers. I’ll go back, put the sql back and execute again so I can get score for this challenge.

Actions to complete the challenge

Go back to the ISPF Primary Option Menu and we need to navigate from here to Z#####.SQL.OUT. =3.4, your IBM user id as dsname, you know the drill.

Let’s edit SQL.OUT.

If you get this.

Press enter 😉

When in editmode, enter the primary command rep p2.output(#14) but do not press enter yet! At the first line we also need to enter the line command c99 to copy all lines.

Lovely! When you get a warning, you can ingore it. Let me check my output.

Now, TSO SCOREP2 confirms I have completed this challenge 🙂

A free weekend, not really, just this saturday!

Ahh, I finally have some free time. I’m about to see the Joker this evening in the cinemas. For the second time. What about you? Seen any new movies lately?

IBM MTM 2019: Part Two – Challenge #13

Challenge the 13th, spooky.

Now now, don’t be scared. I’m here to help. Let’s learn a thing or two about the system utilities z/OS has to offer. Besides that, let’s also fix some JCL syntax errors our intern Kevin has made.

It’s been 10 days! Sorry for that, IRL and work has left me with no spare energy to do all this. I have noticed I gained a lot of e-mail subscribers and I would like to give you a heads-up to also check your spam folder 🙂

z/OS System Utilities & JCL Syntax Error Correction

IBM Master the Mainframe 2019 Part Two – Challenge #13

Let’s get started! We first need to get the required data set for this challenge. We can get this by issuing the primary command tso submit ‘zos.public.jcl(ch13)’ from the ISPF option menu. Choose a random job character if prompted for one, I chose ‘a’.

TIP: if you choose to use this blog, you can actually skip all the submitting and debugging and read what needs to be done.

Oh no, the intern made a mistake. I guess we senior mainframe developers will have to fix this issue. Let’s debug and see which syntax error has been made.

Let’s jump to the status display using =sd ; st primary command from the ISPF option menu. Then enter line command ? in the NP column next to our job. At last, we select the JESYSMSG to see what our errors are.

There we go. Now, let’s see.

There are some unindentifiable characters in this JCL. I guess it has something to do with PGMPATH. But who can tell? It’s just a guess 😉 Let’s copy the JCL to our personal data set, execute it, fix it, rinse and repeat until we have fixed all of the errors.

A full description of what this JCL job does is provided on the challenge page.

For a change I have provided a ton of screenshots. I first navigate to the DSLIST utility using =3.4 and then I filter by my id. After that I edit my JCL data set and create a new member using primary command s ch13. In CH13 I copy ‘zos.public.jcl(ch13)’ into it. Now let’s execute using submit ; =sd ; st and after review the output like we did before.

Again the same error we saw before. Let’s investigate both.

I have searched for the string ‘pgm’ in this file. And what do we notice? All other PGM’s are UPPERCASE. The odd one out is LOWERCASE, make it UPPERCASE.

Same for ‘path‘. Change it to PATH. Let’s submit it again and check what the next error is.

Ok, I have already noticed this issue but decided to go ahead and show it to you guys. Because I like you.

There are three DSORGs that need to be changed and one disposition field. Let’s change these. You notice that on the screenshot above we need to use the correct DSORG for SEQuential datasets. Then pick the right one for the other type of data sets. This exercise is almost the same as challenge 9 from last year.

Observe the change I made. The sequential data set needs the type PSPS stands for physical sequential. The other two require DSORG PO. PO is the data set organization for both PDSEs and PDSs. DSNTYPE is used to distinguish between PDSEs and PDSs.

Now let’s submit again.

Again an error! This is getting tiresome! It looks lik the code is crashing at FILENAME IS (/z/zzzzzz/ch13). That doesn’t look like our filename. Ours is different, in my case it’s /z/z50087/ch13. Let’s change it again! Something tells me this is not the last error. I’m going all the way.

I have changed the PATH. Now let’s execute again and see what the next error is.

Ok it seems there’s a validation error. [email protected] is strange isn’t it?

We need to change [email protected] to PDS. Do that and submit.

Another error! Verb name [email protected] I suspect somebody’s cat has taken a walk on their keyboard. Specifically on the @ button. It might have been a really small cat. But REALLY small. It should actually be REPRO instead of [email protected]

Change and submit!

I have the MAXCC=0000 code so that must mean everything is ok! Let’s quickly check our P2.OUTPUT file!

The file is here! We have completed challenge 13 of part 2!


I’m doing this because of my personal interest in mainframe. I don’t have a job in mainframes, I mainly develop in PHP and Node.js. Personally, I don’t really know what keeps me this motivated about mainframes and blogging. But I like it.

What are you motivated for? Why are you interested in mainframes?