Before I continue, the preparation phase of challenge #15 is going to be a very long wall of text and images. Probably longer than China’s wall. Be prepared or be scared.
A full code review can be found at my GitHub, it’s better to read the GitHub review and blog conclusion if you’re participating.
It’s time for some good old role-play. No, this is not a blog about Dungeons & Dragons. This is about me playing the role of an experienced z/OS technician. My assignment is to help a newbie become familiar with the z/OS environment. I have become the teacher. Worship me.
I’ll be assisting my students by explaining some system details in a report format using a combination of JCL, SDSF, SDSF commands, Rexx scripts, z/OS commands, JES2 commands and to finish the list, some TSO commands.
I’m among the small fraction of the contestants completing the last challenge, but I’m not eligible to be a winner or a honourable mention as I’m not a student. I thought I’d mention this to not keep you waiting. I know, I know… I probably would’ve won everything but hey, I have to stay humble.
This final challenge is a matter of exercising technical creativity to distinguish my ideas and work from the other contestants. I’m given a few ideas with sample Rexx code as the basis for applying my creativity. I have to say that my creativity will be limited as my job currently swallows up all my time. I do hope to finish the master the mainframe challenge but I fear I won’t.
This final challenge is a matter of creativity and quality. It’s not a matter of quantity. All my reports are ought to be a quick read and educational to someone new to the contest system.
Before I start, I’ll be reviewing some examples to help me prepare for this challenge.
IBM Master the Mainframe Part Three – Challenge #15 Preparation
I’ll start out by grabbing a copy of the challenge #15 data sets, tso submit ‘zos.public.jcl(p3ch15)’. This should give me
First of all apologies for the smaller screenshots, I’m taking screenshot on my 13″ mac and the emulator screen is really small. I’m working on #MTM during my commute 🙂
Now I’ll check and see what CH15.OUTPUT holds. CH15.OUTPUT has members S00, S01 and TMP. S00 holds system command output, S01 holds SDSF command output and TMP holds SDSF output but with some more information.
I have two partitioned members, S00JCL and S01JCL.
S00JCL is JCL used to write system command output to CH15.OUTPUT(TMP). S00JCL executes Rexx routine TRIMCOL writing new member S00. Rexx routine TRIMCOL trims unnecessary leading 45 columns writing CH15.OUTPUT(S00).
S01JCL is JCL used to write SDSF command output to CH15.OUTPUT(TMP). S01JCL executes Rexx routine TRIMLINE writing new member S01. Rexx routine TRIMLINE removes unnecessary SDSF primary menu and blank lines writing the remaining output to CH15.OUTPUT(S01).
This is going to be a long blogpost. Like… seriously long! There are 11 different REXX samples. That’s a lot of code to go through, I’ll make a summary of the code I could use to complete challenge #15.
Line 000002 to 000007 prompt to enter a member name. Line 9 with EXECIO * reads all lines from CH15.OUTPUT member name where rpt. is an array – rpt.1 is line 1, rpt.2 is line 2, rpt.0 is the number of line. Line 10 – 12 is a do loop writing each line to the display using Rexx say command.
The do i=1 to rpt.0 is a loop to start at 1 and stop at the last record in the rpt. array. The do loop processing has only 1 action during within the loop – to ‘say‘ the selected record from the rpt. array which happens to be rpt.i where i is the next number.
Line 11 – 16 includes select when conditions. Line 20 – 28 includes labels such as iplinfo with code begin terminated by the return statement. Each return returns the control back to the do loop. Each call branches to the label to execute code following the label.
This script prompts the user to enter a member name and says some information.
Again the user is required to enter a member name, to test we enter S00. IPL stands for initial program load.
This piece of code again prompts to enter a data set member name and then calls several functions that say information.
This code does the same as S00 but with only one difference, instead of saying the information it prints it to P3.OUTPUT(#15). This is a very important piece of code. Yes, the red is more like orange; the default red is headache inducing.
This piece of Rexx code reads from member TMP from CH15.OUTPUT. In this case the logic ultimately removes 43 unnecessary columns from TMP. The behaviour of substring is as follows: it returns the input string its value from position 44 up to and including 77. So the first 43 characters of the input string are lost.
This again reads member TMP and removes SDSF primary menu and blanks from TMP. ‘removes SDSF primary menu’ means it just removes the first 60 lines from TMP where the comments and stuff would be. Then it copies all the lines after line 60 where the line j its length is longer than zero.
Minimum requirements – Apply the golden rule of MVP
Use JCL to process system commands which writes the command output to 1 or more members in CH15.OUTPUT Example: CH15.JCL(S00JCL) Write a Rexx routine to read the 1 or more members from CH15.OUTPUT, then write a report to P3.OUTPUT(#15) Example: CH15.SOURCE(S00#15) Report written to P3.OUTPUT(#15) should include brief headings or statements helping to explain report details to reader Example: Your role is the experienced z/OS tech teaching a newbie (a judge) about the z/OS contest system Under consideration - we might have selected z/OS newbies to help judge final report and optional additional reports NOTE: "optional additional reports" - see Evaluation twisty below Report written to P3.OUTPUT(#15) needs to include a single line that informs reader/judges the name of the Rexx routine used to create the P3.OUTPUT(#15) report - Example: Report created by Rexx routine - ????? - where ????? could be R00#15 in CH15.SOURCE
The golden rule I was talking about? Minimum viable product. Let’s first try to get an MVP and then expand if there’s enough time. I personally can’t reach the wall of fame or be an honorable mention as I’m not a student. That doesn’t mean I shouldn’t do my utter best, but that also means that it doesn’t really matter to which extent I develop this challenge’s solution.
Full code review
I’ve reviewed all code of challenge #15 on my GitHub a bit more in-depth than I’ve done here. I’ve also included all source files for you to view in your favorite IDE. I might update this post to the GitHub code but I’m running low on time folks.
What’s your favorite IDE?