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:
- Sequential Data Set Name
- Partitioned Data Set Member Name
- Unix File Name
- DB2 Table
Each number may be in 1 of 3 formats:
- EBCDIC
- ASCII
- 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 DB2 Table IBMUSER.EMP #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.
Z#####.HUNT1


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?
Z#####.HUNT2
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!
/z/z#####/dennis
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!
IBMUSER.EMP
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 🙂
Conclusion
This was fun and challenging. Let’s edit JCL(P2DONE) and fill in the numbers!
Execute! JOB P2DONE(JOB03959) SUBMITTED
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?








Hello KEVIN!!
what is command to execute and delete data sets?
is the answer 4603?
Hello Anonymous, I’m not allowed to give direct answers of this challenge. If I remember correctly, the datasets should be deleted when you get it right.
– Kevin
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?
Thanks!
Hi Anonymous, I got it in two days. But I think I was lucky, expect it to be within a week.
– Kevin
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?
Thanks.
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.
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?
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?
Alright i got
2468+512C
256+1999D
1983+2007D
2890+500
Still keeps giving incorrect. Please help out kev
Some numbers are negative. Please check these again.
the ones with the D are negative and the C is positive, have you gotten yours@akos?
Regarding 1999D and 2007D. Check what D stands for on this image https://kevindurant.be/wp-content/uploads/2018/12/table3.png.
– Kevin
i got 2869, correct?
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
i couldn’t get the 2nd one.please help.i got 152.
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
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.
Hi Akos, did you forget about the numbers you need to subtract? Some numbers are negative.
– Kevin
I corrected number, but got following error during execution: http://prntscr.com/lyk24g
Thanks a ton kevin
Thanks for this great blog, I was kinda confused about #2. But you pushed me in the right direction 😉
Hi Jaida! I’m glad to hear my blog helped you! Good luck with part 3!
-Kevin