IBM MTM 2019: Part Two – Challenge #06

Hello and welcome to a new episode of fixing things!

Today we’re going to fix some bad JCL our intern Kevin has made last week. Oh Kevin, such a nice guy but sometimes works way too fast. It’s now up to us, senior developers, to fix his mistakes.

JCL: Identify and Correct a Syntax Error

IBM Master the Mainframe Part Two – Challenge #06

First we navigate to our Z#####.JCL, we can do so by using the primary command dslist jcl, then line command e for edit. Inhere we issue the primary command s p2ch6 to create a new member called p2ch6.

On the screenshot above we copy copy ‘zos.public.jcl(p2ch6)’ to our newly created member.

Our newly created member now has the faulty JCL.

Submit JCL and review JCL job output to identify JCL syntax error

Let’s submit ; =sd ; st so we can see the execution error.

INVALID LABEL. Labels typically begin with //. Do you remember my intro from the previous post? JCL HAS TO BE IN ALL CAPS.

THERE, I FIXED IT! ARE YOU HAPPY NOW MR. COMPILER?

The RC code is 0000. So I think Mr. Compiler is happy.

Review successful completion

Let’s check P2.OUTPUT(#06) and see if has the necessary time strings.

It has! We have completed challenge 6!

Any questions, por favor?

When will you release the rest Kevin? Can you help me with challenge 14 of part 2? Well not now, these blogs take time to write so I’m a lot slower than the competitors. I’m doing my utter best to release these as fast as I can. 7 challenges and blogs in 2 days is what I call good service 😉

IBM MTM 2019: Part Two – Challenge #05

HELLO THIS IS A CHALLENGE ABOUT JCL.

JCL IS WRITTEN IN ALL CAPS. SO PUSH THAT CAPSLOCK BUTTON AND JOIN THE JCL CLUB.

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 pds.data 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 ‘zos.mtm2019.public.shared.data(sortcity)’ 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!

Compact!

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?

IBM MTM 2019: Part Two – Challenge #04

Welcome welcome fellow mainframer.

You have stumbled upon my blog and you seem to need help or either you need a good read. Or maybe you’re bored? Or maybe you’re interested in what I do all day? Hey, who will tell?

Again the following disclaimer: the earlier challenges won’t have much screenshots as they are already provided by IBM. I will probably guide you more through the more difficult challenges where there is none to little help from IBM.

Use ISPF editor to change text image

IBM Master the Mainframe Part Two – Challenge #04

If you’re interested in viewing a video that explains the ISPF panel you can view this 8 minute video.

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.

  • dslist seq.data as primary command.
  • e as line command next to SEQ.DATA.
  • if an EDIT entry panel appears press enter to proceed.
  • pfshow off as primary command. This removes the legend.
  • reset as primary command, this hides the MSG notice.
  • c x’00’ ‘(o)(o)’ all;c x’01’ | all as primary command.
  • c x’02’ / all; c x’03’ \ all as primary command.

The previous two commands are some form of REGEX. More about REGEX here. Although this isn’t really REGEX but a more simple change command.

  • dd line command at line 000002, DO NOT PRESS ENTER.
  • dd line command at line 000009, PRESS ENTER.

The dd command deletes several lines inside the editor. A single d as line command only deletes one line.

  • rep p2.output(#04) as primary command.
  • cc as line command at line 000001, DO NOT PRESS ENTER.
  • cc as line command at the line line in the file, PRESS ENTER.

  • if a confirm window appears press ENTER.

You should see Member #04 replaced in the upper right of your screen.

  • end;return as primary command.
  • dslist p2.output as primary command.
  • as line command next to P2.OUTPUT.
  • s as line command next to #04.

If you see a textual representation of the Simpsons then you have successfully completed challenge 04!