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