IBM MTM 2019: Part Two – Challenge #05



Today we will learn a bit more about JCL. JCL stands for Job Control Language. Read more about JCL or you can view a video about JCL.

Job Control Language, JCL

IBM Master the Mainframe Part Two – Challenge #05

JCL in Action

As this is just a series of commands and IBM has provided a lot of screenshots I will just make a summary of the needed actions so you can speedily solve these early challenges.

  • tso submit ‘zos.public.jcl(sortpgm)’ as primary command.
  • =sd;st as primary command.
  • prefix ; owner z##### as primary command, substitute your ID.
  • Verify that you have SORTPGM in your JOB OUTPUT list.
  • as line command next to SORTPGM.

You can view the detail of every output by using the ‘s’ line command next to the DDNAMEs. Return using F3. IBM continues to explain the contents of each DDNAME.

Modify a sort command and submit JCL to execute a SORT program that reads your modified sort command

  • dslist as primary command.
  • e as line command next to Z#####.PDS.DATA.
  • s sortcity as primary command.

The s primary command creates a new member inside the data set. This command is followed by the data set name you want to give to it.

  • copy ‘’ as primary command when you’re inside the sortcity member.
  • reset as primary command to hide the ==>MSG notice.

Inside this JCL we need to change some parameters of a function. SORT FIELDS=(starting position, length, data format, A/D) needs to be changed so it starts at position 30, has a length of 9 and has a sort order of descending.

So I assume the parameters need to be changed to FIELDS=(30,9,AC,D). Change these parameters and press F3 to save.

  • dslist jcl as primary command.
  • e as line command next to Z#####.JCL.
  • sortcity as primary command.
  • copy ‘zos.public.jcl(sortcity)’ as primary command inside the sortcity member. IBM continues to explain the contents of this JCL file.
  • submit ; =sd ; st as primary command.

Again this previous command is a prime example of command chaining. It says we want to submit the job, jumpt to SDSF and check the status display.

Press enter when you see the three asterisks ***. Try to remember the JOB ID.

  • as line command next to SORTCITY job output.

  • s as line command next to EACH DDNAME, press enter.

If the RC return code of JESMSGLG DDNAME is 00 then it means you have successfully changed the JCL sorting. Continue to press F3 until you return to the SDSF status panel.

I have RC CODE 00!

Verify the completion of Part Two – Challenge #05

  • dslist ‘z#####.p2.output’ as primary command.
  • b line command next to Z#####.P2.OUTPUT
  • s line command next to #05
  • cols as primary command.

Observe column 30 for a length of 9. If your data is sorted in descending order of amount of population by cities then you have successfully completed challenge 5!


Excuse me for the compactness of these first set of blogs! The first challenge are really well documented by IBM and I believe supplement screenshots aren’t necessary.

Do you think otherwise?

16 thoughts on “IBM MTM 2019: Part Two – Challenge #05

  1. Hello Kevin
    I finished challenge 5 , and I am getting correct output same as your output slide, but in p2score (status) says the challenge is incorrect and I am facing same with the challenge 8 and 12 , can just tell me how to fix this incorrect status.

    1. Hi Harish

      Sometimes the score system isn’t perfect and it takes a while for it to update. Did you try and score again?

      If that failed, there’s nothing else to do except checking to see if you’ve done every step correctly.

      Kind regards,

      1. Hello

        Sorry for the very late reply, some comments have slipped past my notifications.

        If the data set, member, or z/OS UNIX file is not empty and you do not specify a destination, a “MOVE/COPY Pending” message appears in the upper-right corner of the panel and the data is not copied. When you type a destination and press Enter, the data is copied. Source.

        So either you clear the contents of the file, or you specify the location using a label like this:

        Kind regards,
        – Kevin

  2. Hello thanks for all your updates ! , so ive followed all of your steps for part 5 and have the same results , only thing is when I check my part 5 status it says incomplete , im pretty sure it has something to do with if im submitting it correctly any tips on how to be sure I submitted the project correctly. Thanks a lot .

    1. Hi Anonymous

      The scoring system isn’t flawless, can you try and solve the next challenge and run TSO SCOREP2 again? A lot of users here inquired about this issue but then later the system scored it as complete.

      Kind regards,
      – Kevin

  3. on giving the primary command TSO SCOREP2 …it must show that how many challanges i have completed …but it is showing nothing in my case although i have completed 5 challanges. BTW thanks for your support.

  4. Hello,
    these seems really easy challenges, but if somebody stuck on some point he/she is unable to go forward without deeper instructions. So necessity of more screenshots is a complicated question!

    1. Hi X,

      Sorry for the lack of screenshots in this post! I will definitely post more screenshots in the future. I have also noticed your other comments, thanks for the kind words 🙂

      Kind regards,
      – Kevin

Leave a Reply

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