Learning and using z/OS creatively
Part Three - Challenge #15

The Final Challenge!

Good Luck! Remember, Part 3 is not a race. You have until December 31.

Storyline - The role you are now playing is a role of an experienced z/OS technician. Your assignment as an experienced z/OS technician is to help a newbie become familiar with the z/OS environment. How you are going to assist a newbie become familiar with z/OS is by explaining system details in a report format using a combination of JCL, SDSF, SDSF commands, Rexx, z/OS commands, JES2 commands, and TSO commands.

You are among a small fraction of the enrolled contestants completing the last challenge with hopes of being in the winner circle or in the honorable mention circle. It is possible for several contestants to be tied going into the final challenge. Therefore, your creativity applied to the final challenge is used to break ties, determine the winners, and determine who is in the honorable mention circle.

The final challenge has no correct or incorrect answer.

The final challenge is a matter of exercising technical creativity to distinguish your ideas and work from the other contestants. You are given a few ideas with sample Rexx code as the basis for applying creativity.

Background:

Learning and using z/OS creatively
  • Final challenge creativity is NOT a matter of quantity
  • Final challenge creativity is a matter of quality and simplicity**
      Achieving quality and simplicity can take a lot of work

** Elaboration on quality and simplicity related to applied challenge creativity:

  • Discover and report on interesting technical details about the system
  • Create several independent reports
      Rexx is used to write report output
      Rexx input can be any combination of output from:
        + z/OS commands
        + JES2 commands
        + SDSF commands
        + TSO commands
        + Data from any data source
  • All reports should be a quick read and educational to someone new to the contest system
      Full sentences are NOT required but are acceptable
      Samples are provided
      You will be reviewing a lot of samples to help you prepare for the challenge

Preparation:

Get a copy of challenge 15 data sets
enter tso submit 'zos.public.jcl(p3ch15)'

JCL job p3ch15 created the following data sets:

  1. Z#####.CH15.JCL
  2. Z#####.CH15.OUTPUT
  3. Z#####.CH15.SOURCE

A brief explanation about the sample JCL, Rexx source code, and output is coming up.


Report Output - Samples

Browse your personal CH15.OUTPUT partitioned data set
  Observe the partitioned data set has 3 members:

  1. S00
  2. S01
  3. TMP

Select member S00 in CH15.OUTPUT to review
S00 has system command output

Select member S01 in CH15.OUTPUT to review
S01 shows SDSF command output

Select member TMP in CH15.OUTPUT to review
 Observe is SDSF output that include information from a few SDSF commands
S01 excludes the SDSF primary menu and blank lines


JCL - Samples

Browse your personal CH15.JCL partitioned data set
  Observe the partitioned data set has 2 members:

  1. S00JCL
  2. S01JCL

Select member S00JCL in CH15.JCL to review
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)

Select member S01JCL in CH15.JCL to review
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)


Rexx - Samples

Browse your personal CH15.SOURCE partitioned data set
  Observe the partitioned data set has 11 members:

  1. SAMP1
  2. SAMP2
  3. SAMP3
  4. SAMP4
  5. SAMP5
  6. SAMP6
  7. SAMP7
  8. S00
  9. S00#15
  10. TRIMCOL
  11. TRIMLINE

Select member SAMP1 in CH15.SOURCE to review
SAMP1 is Rexx

Observe the following:
  • Line 2 - 7 prompts for CH15.OUTPUT member name
  • Line 8 allocates CH15.OUTPUT 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 lines
  • 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

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP1 to view how the Rexx code works

Select member SAMP2 in CH15.SOURCE to review
SAMP2 is Rexx

Observe the following:
  • Line 11 includes parse var rpt.i
     where w1 w2 w3 w#
     captures each string or word in the line separated by a space

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP2 to view how the Rexx code works

Select member SAMP3 in CH15.SOURCE to review
SAMP3 is Rexx

Observe the following:
  • Line 11 includes if pos('IEE254I',rpt.i)
     The if condition returns a positive number for the position in the line where IEE254I is found
  • When IEE254I is found, then say the entire line, rpt.i

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP3 to view how the Rexx code works

Select member SAMP4 in CH15.SOURCE to review
SAMP4 is Rexx

Observe the following:
  • Line 11 - 16 includes select when conditions
  • Line 20 - 28 includes labels such as iplinfo: with code terminated by return
  • Each return returns control back to the do loop
  • Each call branches to the label to execute code following the label

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP4 to view how the Rexx code works

Select member SAMP5 in CH15.SOURCE to review
SAMP5 is Rexx

Observe the following:
  • Line 1 - A system data set member is allocated
  • Line 2 - All lines are read into array parm.
  • Line 3 - Each line is written to display using say Rexx commmand

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP5 to view how the Rexx code works

Select member SAMP6 in CH15.SOURCE to review
SAMP6 is Rexx

Observe the following:
  • Prompts for member name to be read from CH15.OUTPUT

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP6 and respond with member S00 to view how the Rexx code works

Select member SAMP7 in CH15.SOURCE to review
SAMP7 is Rexx

Observe the following:
  • Prompts for member name to be read from CH15.OUTPUT

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of SAMP7 and respond with member S00 to view how the Rexx code works

Select member S00 in CH15.SOURCE to review
S00 is Rexx

Observe the following:
  • Prompts for member name to be read from CH15.OUTPUT

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of S00 and respond with member S00 to view how the Rexx code works

Select member S00#15 in CH15.SOURCE to review
S00#15 is Rexx

Observe the following:
  • Prompts for member name to be read from CH15.OUTPUT
  • Routine does exactly the same thing as S00 Rexx routine with 1 exception:
      Rexx say commands are replaced filling array and writing records to P3.OUTPUT(#15)
      using EXECIO Rexx command

F3 to return back to CH15.SOURCE list of partitioned data set members

Enter ex to the left of S00 and respond with member S00 to view how the Rexx code works

View P3.OUTPUT(#15) to see output written by S00#15 Rexx routine

Select member TRIMCOL in CH15.SOURCE to review
TRIMCOL is Rexx

Observe the following:
  • Prompts for member name to be written to CH15.OUTPUT
  • Routine reads member name TMP from CH15.OUTPUT
  • Routine removes 43 unnecessary columns for TMP

TRIMCOL is used in CH15.JCL members

Select member TRIMLINE in CH15.SOURCE to review
TRIMLINE is Rexx

Observe the following:
  • Prompts for member name to be written to CH15.OUTPUT
  • Routine reads member name TMP from CH15.OUTPUT
  • Routine removes SDSF primary menu and blanks from TMP

TRIMLINE is used in CH15.JCL members


Explanation of Process
  1. Submit JCL to process system commands
      Command output written to member name TMP in data set name CH15.OUTPUT
  2. Rexx routine reads TMP removing blanks line or unnecessary leading columns
      Output written to a unique member name in data set name CH15.OUTPUT
  3. Rexx routine reads the unique member name or member names
      Rexx routine writes a report to the display
  4. When report is ready, then create Rexx routine to write report to P3.OUTPUT(#15)

System Commands

z/OS and JES2 display commands are available to report system information. Any reference to display command means the display command with specifically selected display command operands.

You are expected to try various z/OS and JES2 display commands and briefly review the display command output.

  • Many display commands exist - each with a wide variety of operands
  • Some display commands are more interesting than others
      Quickly rule out commands that seem boring to you
      Interesting command output become candidates to complete challenge
  • Potentially discover interesting relationships from different commands for a report
  • A report should involve output from a combination of several commands

A sample Rexx routine is provided to demonstrate how to parse across display command output.

You are to select interesting details from the command output and write an easy to understand report using your own words or headings.

Use SDSF to display information about the z/OS and the critical companion subsystem, JES.

SDSF (=sd) is useful for gather information about the system.

Your ID is authorized to enter z/OS and JES2 display commands.

Try the following from SDSF:

  • enter ulog to create a user log of activity
  • enter /d iplinfo
  • enter /d m=cpu
  • enter /d m=stor
  • enter /d a,l
  • enter /d a,all
  • enter /d ts,l
  • enter /devserv qdasd,type=all
  • enter /d r,l
  • enter /$d spl
  • enter ulog to display only your command output
z/OS Commands Manual

Available display z/OS commands start on page 239 and end on page 492.

JES2 Commands Manual

Available display JES2 commands start on page 245 and end on page 568.


Comments about Rexx

Rexx was discussed in a previous challenge.
You may not have heard much about Rexx before because the newer languages frequently receive all the hype.

Rexx is highly underrated and an unsung hero of scripting languages.
Rexx in the IBM Z environment has remained a popular 'go to' language for 3 decades for those familiar with Rexx.

If you work in a technical role with z/OS or z/VM, you will most likely encounter Rexx routines written by senior and retired technicians.

Rexx is used for automation, infrastructure support, reporting, protyping, and business applications.

Rexx can be executed interactively or in batch using JCL.
Rexx source code can be executed directly such as an scripting language or Rexx can be compiled in system executable modules.

Rexx can work with MVS data sets, Unix files, and process any data from any z/OS data source.

Using Rexx with system utilities and functions is a powerful combination that you will observe in the challenge.

The Internet has a wealth of Rexx information and sample code


Challenge:

Recommendations
  • Do not change S00JCL and S01JCL JCL samples in CH15.JCL
      Copy to new members such has R00JCL, R01JCL, R02JCL, etc.
  • Do not change S00, S00#15, S01 Rexx samples in CH15.SOURCE
      Copy to new members such has R00, R00#15, R01, etc.
  • Do not change members that begin with 'S' in CH15.OUTPUT
      Keep members beginning with 'S' as samples
      When submitting JCL, modify TRIMCOL or TRIMLINE to create members names that begin with 'R'

If you want create a backup of your work in CH15.JCL, CH15.SOURCE, and CH15.OUTPUT,
then tso submit 'zos.public.jcl(bkupch15)'

Above JCL creates copies with names, CH15.JCL.BACKUP, CH15.SOURCE.BACKUP, CH15.OUTPUT.BACKUP

If you tso submit 'zos.public.jcl(p3ch15)' a second time,
then CH15.JCL, CH15.SOURCE, and CH15.OUTPUT will be deleted and replaced with original copy

If you tso submit 'zos.public.jcl(p3ch15)' a second time,
then consider creating a backup first to have previous work available in the 'backup' data sets


Minimum Requirements

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


Evaluation

Read first twisty in Background section again - Learning and using z/OS creatively

When judging the final challenge:

  1. Reviewed first -- P3.OUTPUT(#15)
      Put your best ideas for training a newbie and showing interesting details you discovered (or were previously aware of) here
  2. Reviewed second -- the Rexx routine in CH15.SOURCE used to create P3.OUTPUT(#15)
      Looking for Rexx code demonstrated ability
  3. Reviewed third -- CH15.JCL members used to write the CH15.OUTPUT member or members
      Looking for demonstrated ability to use JCL to capture detailed system snapshot in hardcopy, such as members in CH15.OUTPUT
  4. Reviewed last -- any and all additional reports NOT found in P3.OUTPUT(#15) where:
      The report content is written to display as a result of executing your Rexx routine in CH15.SOURCE
      Rexx routines you want judges to execute and review need to be listed at the end of P3.OUTPUT(#15)
      Example:
        Heading - Additional reports about z/OS contest system are available by executing -
          R10, R11, etc.
    Optional reports are an opportunity to avoid your P3.OUTPUT(#15) report from being too verbose - helping to achieve quality over quantity

Remember: Quality has significance far beyond quantity. Therefore, a large volume of independent reports beyond P3.OUTPUT(#15) has little chance for more points.

The final challenge is very different from the previous action based challenges with specific instructional guidance. The final challenge is the opportunity to explore the environment and think about what you would present to demonstrate your expanding z/OS technical ability. Have fun and work on the final challenge as time permits. You have months to complete the challenge.


Next: Completing Part 3