IBM MTM 2018: Part Two – Challenge #14

Just this challenge to go and then I’ll be able to have a crack at challenge #15. This is going to be a really short blogpost as there’s really not much to say. Let’s just hope I find time to do challenge #15 by friday.

Let’s not dwell and get on with it pronto!

DB2 SQL

IBM Master the Mainframe Part Two – Challenge #14

First of all I need to configure the DB2 ISPF Panel. The only thing I have to do is follow some simple instructions and I ended up with a blank file where I can put my DB2 SQL queries in.

I’ve executed select * from ibmuser.dept; and got the following output.

Looks exactly like the example screenshot. Now I need to edit my SQL and select the depts where debtname equals OPERATIONS. To insert a new line you use the i line command.

Output looks good! Next query: select deptname from ibmuser.dept where admrdept = ‘A00’;

Again, looks good! Now I need to select all rows and all columns from teble emp owned by ibmuser. That’s probably going to be select * from ibmuser.emp; let’s check!

That’s right! EASY! Now let’s just copy it to P2.OUTPUT(#14) and then we’re ready to go on to challenge #15!!!

Press ENTER and voila! Challenge 14 done! These are too easy!

15

A milestone! Have you reached any milestones lately?

IBM MTM 2018: Part Two – Challenge #12-13

This time I’m tackling two challenges at once. I really want to get to challenge 15 by the end of this week. Let’s do this!

JCL & Unix Files

IBM Master the Mainframe Part Two – Challenge #12

In this challenge I’ll learn how to copy data to a Unix file using JCL. There’s several ways to do this but this challenge is particularly about using JCL. This could also be done by using Unix cp command, TSO ocopy, oput, oget, oputx and ogetx commands. And some other methods.

Let’s go ahead and view the JCL of CH12JCL.

I need to edit line 0000013 where SYSUT2 is the output of the data copy. I also need to change line 000017 where STDOUT is the output of the word count command. This proves that the data was successfully copied into the Unix file name.

The output of this JCL then needs to be copied to P2.OUTPUT(#12). Let’s read what IBM has to say about this challenge.

  •   Reminder – substitute your ID for Z##### and z#####
  •   Copy input is data set name Z#####.PDS.DATA member name MIX
  •   Copy output is Unix path and file name /z/z#####/mix
  •   Program IEBGENER DDNAME SYSUT1 is input
  •   Program IEBGENER DDNAME SYSUT2 is output
  •   JCL DD PATH= is used to reference Unix file name
  •   What follows PATH= must be enclosed in single quote marks
    comma is needed after the path name to continue the DD statement
  •   The Unix file path and file name is lowercase
  •   Program BPXBATCH DDNAME STDOUT is the Unix command output
  •   JCL RESULT stepname, DDNAME STDOUT, needs to write output to &SYSUID..P2.OUTPUT(#12)

So as you can read from the bullet list, the paths equals to “‘/z/z30163/mix’,” without the double quotes, lowercase. Then the DSN STDOUT needs to write to is &SYSUID..P2.OUTPUT(#12).

That’s pretty straight forward. Let’s change the JCL.

Let’s execute!

So we get MAXCC=0256 as expected! I’ll check member #12 inside P2.OUTPUT to verify the word count.

Looks like a word count! Let’s continue to challenge #13!

Unix System Services Fun and Facts

IBM Master the Mainframe Part Two – Challenge #13

In this challenge I’ll learn how to use JCL for Unix shell processing and I’ll also edit some Unix files. I need to execute CH13JCL then I’ll have to edit the file using the Unix shell prompt.

Let’s first verify the output.

Output written to sept1752. Looks like I can start enter the realm of Unix safely! I can do that by entering tso omvs as a primary command just about anywhere.

Looks familiar! Anyway, let’s edit sept1752. Entered oedit sept1752 and here I go!

It appears that 11 days are missing from the calendar. On line 8 starting in column 1 I need to enter the year in which the Gregorian calendar was first introduced. A quick Google search says that it was first introduced in the year 1582.

Then I’ll replace P2.OUTPUT(#13) using primary command replace p2.output(#13) and prepare to copy the first 99 lines using the line command c99.

Member #13 created! Now let’s exit the oedit section & the unix shell session and return to the ISPF session. I’ll go ahead and check if I’ve copied everything correctly.

P2.OUTPUT(#13) looks good!

PROGRESSION

I’m getting there! I’m slow I know! I could’ve done these challenges a month ago if I knew they were so simple. Part 3 is getting closer and I’m very curious about it’s difficulty. Please keep in mind that I won’t be posting part 3 solutions, I’ve promised that to Paul Newton! I will post my ideas on how to solve the challenges, but there’ll be less screenshots and code.

Next challenge will be about DB2. I’ll have to dig up my SQL skills again, hell yeah!

Have you made any progress anywhere?

IBM MTM 2018: Part Two – Challenge #11

JCL is rarely written from scratch. Brings me back to the good old days where I was puzzling some code together I found on StackOverflow. I didn’t even understand half of what I was copying. It’s something I often look back to; just shows how far I’ve come.

This’ll be a small blog post as this challenge is also really simple.

Create JCL to Delete Data Sets

IBM Master the Mainframe Part Two – Challenge #11

The assignment is very easy. Make a new member inside Z30163.JCL called CH11JCL. This can be achieved by using the s ch11jcl primary command. Then copy the code from CH09JCL by issuing the copy ch09jcl primary command.

Please observe the blue text at the top of the image. I verified that it said CH11JCL. Now we need to change the jobname from CH09JCL to CH11JCL at line 000001. Then I need to delete all statements that enable creating data sets. In my case, I deleted line 15 up to and including 50.

Now execute using submit ; =sd ; st. It should output an Max-RC code of 0004. I know, the two screenshots above are horrible. I should’ve deleted the blank lines. This can be done using the DELETE command.

Looks good! But did the data set get deleted? Let’s check!

Yup! Those error codes indicate successful completion of this challenge! Copied the output to P2.OUTPUT(#11) and I’m done for today!

DELETE IT MASTER WAYNE!

I just copied some stuff and deleted some stuff today. What about you? Did you delete something recently?