More UNIX and more JCL? I can feel my beard growing already! Let’s grow a LINUX beard together!
Manage Unix Processing with JCL
IBM Master the Mainframe 2019 Part Two – Challenge #10
Submit JCL used to execute Unix shell commands
From the ISPF primary option menu we need to issue the primary command tso submit ‘zos.public.jcl(unixsh)’. Now via SDSF we need to check the job output, we can get to that using the sd primary command and then filter using prefix ; owner Z50087; st. Change my ID to your IBM ID.
Next to the job we can use the line command ? to see the output of the job. Next to every output we can use the line command s to select and view the job output. We need to view DDNAME STDOUT with StepName SHELL. STDOUT is where the unix commands wrote the output.
Let’s go back to the output list by pressing F3. Now we need to view DDNAME SYSPRINT with StepName LISTC. This is the output of the VSAM linear data set. When you viewed it, just return using F3.
To view the JCL we can put sj line command next to the jobname in the NP column. When inside the edit mode we need to execute the primary command rep jcl(unixsh) and also copy the first 19 lines using c19 as line command at line 000001.
If you get a warning screen, then just press enter.
Modify JCL to execute Unix commands and write output to MVS Partitioned Data Set Member
This will be easy as cake! Let’s first navigate to our JCL data set using dslist jcl and edit the data set. Select s member UNIXSH.
We need to modify this member its STDOUT DD to DSN=&SYSUID..P2.OUTPUT(#10),DISP=SHR,DCB=LRECL=80. Besides that we also need to change the //STDPARM DD * to only execute 3 commands.
- sh uname -mrsvI ;
- rm -r * ;
- ls -al ;
Let’s see.
This looks like it. I’ll submit using sub ; dslist p2.output and see if the output is there.
Looks good! TSO SCOREP2 also deems this correct. I am a happy man!
Hello again Kevin, I was stuck on Challenge 10 where you had to modify STDOUT DD and STDPARM DD, and I was stuck on the latter portion because I had no idea where to type out the 3 Unix commands, but after looking for help online, I once again found your blog and it helped me out a ton. Thanks again for taking the time to post these detailed how-tos.
Hi Shirley
I appreciate the kind words! Goodluck with the rest of the challenges!
Kind regards,
Kevin
I’m having the same issue. #10 output show incomplete and I have exactly what you have. ugh.
Thanks for the help though.
Hey I just found your website, its been very helpful, thanks! For some reason I’m getting the same output but after submitting it and checking the status its marking challenge 10 as incomplete. Any ideas?
Hi Anonymous
Thanks for the kind words!
There can be multiple reasons for this. First of all, please review the incorrect challenge and fix any mistakes if there are any. Secondly, try and run TSO SCOREP2 again.
From my experience the system hasn’t always been foolproof and it sometimes takes a while for it to either “update” the statusses or rate them correctly.
Kind regards,
– Kevin
Hi kevin,
Is it necessary to complete entire part 2 in one session . Because I did upto callenge 8 yesterday and challenge 10 today. But 10 is showing incomplete.
Hi Jay
No it’s not necessary. Sometimes the scoring system needs a little bit of time or you should try and score it again if you think you have solved this challenge correctly.
Kind regards,
– Kevin
I submit it sub ; dslist p2.output but can’t find any there in #10? Why?
Hi Kevin!
I found out in p2.output that my output was kinda different from yours but my status shows correct as well!
Any idea why our outputs are different?
https://user-images.githubusercontent.com/37384167/68078771-3ce5e100-fd9a-11e9-88ce-bb694fe3693a.png
Hi CY Leung,
I believe the only difference in our outputs are the amount of data/memory present in the system. It’s possible that OMVSKERN now has more data as your command was executed more recently than mine. It’s just a guess.
Kind regards,
– Kevin
I have exactly the same output and my status for challenge 10 is incomplete. I followed exact same steps.
Just update tso scorep2 and enter. it will refresh the status
Hi Kevin,
This challenge was without any issues!
Thanks to explain!!