IBM MTM 2019: Part Two – Challenge #10

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 SHELLSTDOUT 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 LISTCThis 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=80Besides 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!

11 thoughts on “IBM MTM 2019: Part Two – Challenge #10

  1. I’m having the same issue. #10 output show incomplete and I have exactly what you have. ugh.

    Thanks for the help though.

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

    1. 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

  3. 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.

    1. 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

    1. 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

Leave a Reply

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