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?

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

    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.