Getting Started
Part Three - Challenge #01

Thinking about starting Part 3?
Just Do It!

What you can expect to learn as a result of your Part 3 participation

You will become familiar with syntax associated with frequently used z/OS utility programs and commonly used programming languages.

Early challenges expose you to the flexibility of z/OS sort program utility and assumes you have no experience with program languages.

Code is provided exposing you to the syntax of various program languages.

The learning objective is to become familiar with the syntax of various program languages and how to compile and execute the various program languages. If you do not know how to program, then you might learn to have no fear of programming and even become comfortable with programming.

While many Information Technology jobs have no computer programming requirement, Information Technology professionals know their value and ability to contribute are enhanced by knowledge and familiarity with computer programming.


Part 3 intends to leave you with 5 "best practices" applied to application program development:

  1. Keep it simple
  2. Become familiar with system utilities
  3. Do not write a program when a system utility can accomplish the task
  4. Scripting languages are an excellent way to develop program process logic
  5. Use compiled programs when processing a high volume of data

How to get started and complete the challenge

From ISPF panel

  • Enter tso part3

Execution of part3 routine allocated Z#####.P3.OUTPUT and wrote a single line into member #01

The basic skills acquired in Part 2 enabled you to complete the following task using abbreviated instructions

  1. Edit Z#####.P3.OUTPUT(#01) --- remember to substitute Z##### with your ID
  2. Copy in lines from P2.OUTPUT(#01), after, a, the first line number in P3.OUTPUT(#01)
      where copy is an ISPF primary command and after, a, is an ISPF line command
      The result is a line for every country in P3.OUTPUT(#01)
  3. Delete all country lines with the exception of your country
      The result is 2 lines in Z#####.P3.OUTPUT(#01)

You broke the ice on Part 3 and you are ready for the next challenge

Next: Challenge #02

SORT Utility Capabilities
Part Three - Challenge #02

Background:

You will learn about SORT capabilities from your assigned mentor, Mister Peabody

SORT utility has useful data processing capabilities beyond the obvious.

One objective of Part 3 is to never write a program when a system utility will accomplish a needed task.

Your objective is to develop a process to validate client records.
  Validating client records is a real world data processing task.

Your assignment is to validate client records

You are new to the responsibility of validating another companies client master file.

A senior technician, Mister Peabody, is assigned to guide you. Let's call him Peabody for short.

Peabody has decades of experience and plans to retire. Peabody knows the ability to locate and use the professional documentation is critical to completing assignments. Peabody is unable to remember everything but he does remember where to find technical details needed to accomplish a task. When Peabody fails to remember details to accomplish a task, he will direct you to specific professional documentation.

NOTE: Whenever you see "Advice from Peabody" in Part 3, the information is extremely helpful.


Challenge Situation
  • Your company, (AAGI) AA Global Investments, periodically acquires smaller regional investment companies
  • AAGI is negotiating to acquire, BBRI, BB Regional Investments
  • Acquistion of BBRI includes 45 million clients
  • AAGI due diligence is to validate BBRI client records
  • BBRI gives AAGI the master file of 45 million client records with the corresponding record layout

Advice from Peabody
  • Study BBRI client master file record layout to develop a validation plan.
  • Does the BBRI client master file contain duplicate records?
  • Does the BBRI client master file contain invalid field formats in the client records?"

Peabody tells you about a "toolbag" of JCL used to execute system utilities and special programs to validate record layouts.

Peabody tells you the SORT utility can identify duplicate records using a specific control statement,
SUM FIELDS=NONE.


Challenge:

Study the Master File Client Record Layout
Peabody reviewed the client master file record layout with you and made a few observations.

Peabody mentioned the layout is a simple client master file layout with defined field types to help quickly identify duplicate records.

The Unique Account Number can be used to identify duplicate records.
  -- A client may have multiple account numbers.
  -- A duplicate account number is a data problem.

Note: The challenge uses a small BBRI master file but the file could easily be 45 million records.


Any Duplicate Unique Account Numbers in the Master File?

Peabody wants you to report back to him the total duplicate unique account numbers found in BBRI master file.

You are given the following details to get the information Peabody requested:

  1. Edit your z#####.jcl partitioned data set and select, s, a new member name, sort001
  2. Copy 'zos.public.toolbag(sort001)' into z#####.jcl(sort001)
  3. JCL job sort001 is a simple sort accompanied by SUM FIELDS=NONE statement
  4. Modify JCL SET operation to reference ZOS.PUBLIC.BBRI.CLIENTS as the BBRI SORTIN data set name
  5. Submit and review output
  6. If message ICE055I is in SYSOUT DDNAME of the JCL job output,
      then any records with duplicate unique account numbers where found and deleted.
      The total duplicate unique account numbers follow DELETE in message ICE055I.

You report the number of total duplicate unique account numbers found to Peabody.
Peabody responds, when duplicate records are found the business analysts need more information.
You must provide a special report about the duplicate records.


Business Analysts and Auditors Request a Report About BBRI Client Records

Peabody explains when duplicate records are found, then the business analysts want the following details:

  • List of client records containing duplicate unique client account numbers
  • List of client records that excludes the duplicate account numbers

Peabody informs you that a SORT companion utility program, ICETOOL, is significantly more feature rich.
ICETOOL can create the needed report about the duplicate unique account numbers. However, several minor modifications are needed.

You are given the following action items to get the information the business analysts requested:

  1. Edit your z#####.jcl partitioned data set and select, s, a new member name, sort002
  2. Copy 'zos.public.toolbag(sort002)' into z#####.jcl(sort002)
  3. JCL sort002 executes the SORT utility companion program, ICETOOL
  4. Modify JCL SET operation to reference ZOS.PUBLIC.BBRI.CLIENTS as the client master file input
  5. Modify ICETOOL select control statement directives -
      Observe the select statement directive ON(P,M,F)
      where P,M,F are values for starting position (P), length (M), and field format (F)

      ** Get the unique account number values for P, M, and F from the JCL job SORT001
      where the control statement instructs the program to sort the data from SORTIN
      using starting column, length, ascending A order, and character format.

      ISPF split and swap features are available
        F2 will 'split' making 2 displays available
        F9 will 'swap' between the 2 displays
        F3 is available to terminate 1 of the displays
  6. Submit and review output
  7. Report needed by business analysts is written to Z#####.P3.OUTPUT(#02)

You and Peabody review the JCL job output and the report in Z#####.P3.OUTPUT(#02).

Peabody observed the report is NOT exactly what the business analysts requested.

Peabody needs you to adjust an ICETOOL select control statement directives to get a report needed by the business analyst.


Adjust ICETOOL Select Control Statement Directive

The current Z#####.P3.OUTPUT(#02) has a single record for each duplicate unique client account number.

The business analysts need the duplicate report to include all duplicate unique account number records to compare each record with all duplicates of the record

Peabody mentioned the select control statement directive LASTDUP needs to change.
However, Peabody could not remember the syntax of the replacement directive to write all the duplicate records into the duplicate record report.

Peabody tells you to look at the following ICETOOL select statement directive documentation to determine the syntax of the directive needed to write all the duplicate records into the duplicate report.
Using the ICETOOL utility - Selecting records by field occurrences


  1. Edit z#####.jcl(sort002)
  2. Modify ICETOOL select control statement directive LASTDUP with a directive writing a report the business analysts need to visually compare the duplicate records with each other
  3. Submit and review output
  4. Report needed by business analysts is written to Z#####.P3.OUTPUT(#02)

You just begun the journey of learning tricks known by z/OS technicians. You will learn more!

Next: Challenge #03

Sort Utility Capabilities Continued
Part Three - Challenge #03

Background:

You will learn to validate specific field formats within a collection of data records

Programs that accept data input can help ensure field formats are valid.

When accepting data from another source or company, validating the data
is critical before trusting the data records are valid - simply referred to as data validity.

The previous challenge identified duplicate records and created a report with the
duplicate records for review by the business analysts or auditors.

Another requirement outlined in the previous challenge,
"Does the foreign client master file contain invalid field formats in the client records?"

You are asked for a specific report on the data validity of the account limit and account balance fields.


Advice from Peabody

Peabody knows what the business analysts and auditors want:

  1. A report on any record with an invalid packed decimal in the Account Limit field
  2. A report on any record with an invalid packed decimal in the Account Balance field

Peabody suggests review of record layout again


Peabody tells you the SORT utility can perform a validity check on packed decimal data fields.

Peabody asks you to observe the Account Limit packed decimal field starts in position 9 for a length of 5
and the Account Balance packed decimal field starts in position 14 for a length of 5.

Peabody tells you the key to using the more advanced features of SORT and ICETOOL starts with understanding a logical expression.


What is a Logical Expression?
Logical Expressions are used for:
  1. Comparison
  2. Substring Comparison Tests
  3. Bit Logic Tests
  4. Date Comparisons
  5. Numeric Test
  6. Alphanumeric
Logical Expressions consist of:
  1. Relational Conditions
  2. Comparison Operators

A logical expression conditional statement can have any of following forms:

  • relational_condition#1, comparison_operator, relational_condition#2
  • relational_condition#1, comparison_operator, C'constant'
  • relational_condition#1, comparison_operator, NUM
  • relational_condition#1, comparison_operator, alphanumeric_char
      where alphanumeric_char values are:
        UC - Uppercase characters (A-Z)
        LC - Lowercase characters (a-z)
        MC - Mixed case characters (A-Z, a-z)
        UN - Uppercase and numeric characters (A-Z, 0-9)
        LN - Lowercase and numeric characters (a-z, 0-9)
        MN - Mixed case and numeric characters (A-Z, a-z, 0-9)

AND or OR can be used to get the result from more than one logical expression

Relational Condition consists of:
  1. Starting Position (p)
  2. Length (m)
  3. Format (f)
      Format Types
Comparison Operators consist of:
  1. EQ - Equal to
  2. NE - Not equal to
  3. GT - Greater than
  4. GE - Greater than or equal to
  5. LT - Less than
  6. LE - Less than or equal to

Challenge:

Data Validity Report on Account Limit and Account Balance

Peabody wants you to start with an analysis of the BBRI client record Account Limit and Account Balance fields.
  where the data fields are both packed decimal.

PD is the relational condition data format type for packed decimal.

Peabody gives you the following to help gather the information:

  1. Edit z#####.jcl partitioned data set and select, s, a new member name, sort003
  2. Copy 'zos.public.toolbag(sort003)' into z#####.jcl(sort003)
  3. Modify JCL job to reference ZOS.PUBLIC.BBRI.CLIENTS as the input client data set name
  4. Modify ICETOOL control statements replacing both (P,M,F), 1 for each packed decimal field, with the appropriate starting position (P), length (M), and data format (F) for Account Limit and Account Balance
  5. Submit and review output
      Max-RC with CC 00012 is expected
  6. Check JCL JOB output DDNAME OUTDD
      If the Account Limit or Account Balance fields have a string of asterisks,
      then a bad packed decimal field was detected
  7. Check JCL JOB output DDNAME TOOLMSG
      All records with a problem packed decimal field should be reported with the invalid HEX VALUE

Peabody explains knowing the specific invalid hex values found in Account Limit and Account Balance field is needed because
while the business analyst or auditor did not request the specific hex values, once you find invalid hex values,
they may ask you for the specific hex value to help determine the correct amount.


Create Account Limit and Account Balance Data Validity Report

Peabody informs you sort JCL is available to create the report.

  1. Edit z#####.jcl partitioned data set and select, s, a new member name, sort004
  2. Copy 'zos.public.toolbag(sort004)' into z#####.jcl(sort004)
  3. Modify JCL job to use ZOS.PUBLIC.BBRI.CLIENTS as the client master file input
  4. Modify control statements replacing (P,M,F) for each packed decimal field with the appropriate
    starting position (P), length (M), and data format (F) for Account Limit and Account Balance
      Carefully study the INCLUDE statements
      -- GOOD records uses EQ comparison operator and the AND operation for checking both Account Limit and Balance
      -- BAD records uses NE comparison operator and OR operation for checking both Account Limit and Balance
  5. Submit and review output
  6. The "BAD" record report needed by business analysts is written to Z#####.P3.OUTPUT(#03)

Documentation Sources

Peabody Comment

Nice job!

Learning to use SORT utility and the companion ICETOOL utility can save you many hours of labor. Inexperienced technicians frequently write programs from scratch because they have never developed on an above average platform that contain system utilities such as SORT and ICETOOL.

Peabody anticipates based upon his previous experience that the business analysts will eventually ask for additional information such as:

  • BBRI clients with accounts at AAGI
  • Comment fields searched for specific words
  • Name and address fields containing non-printable characters

Peabody wants you to know that another assignment (challenge) is antipated where the SORT utility and companion ICETOOL utility is the best way to complete the assignment.


Successful completion is a report in Z#####.P3.OUTPUT(#03) containing records with invalid Account Limit and Account Balance packed decimal.

Next: Challenge #04

Application Development Using COBOL
Part Three - Challenge #04

Background:

Common Business-Oriented Language

COBOL, Common Business-Oriented Language, manages some of the most critical data and business logic in the world's economy. Many reasons exist for why COBOL is a computer language with incredible longevity.

COBOL programming language benefits from over 50 years of advancements, such as, COBOL compiler optimization, and COBOL runtime performance.

The core business logic of many large enterprises has decades of business process improvements embedded in COBOL programs.

The point is - whatever you read or hear about COBOL, be very skeptical. The opportunity to work directly with someone involved in writing or maintaining critical business logic using COBOL is an opportunity to learn about the operation of the core business. Business managers, business analysts, and decision makers come and go. The sum of all good business decisions can frequently be found in COBOL programs. The answer to "How does this business actually work?" can be found in COBOL programs.

COBOL is incredibly easy to learn and understand. Auditors are not programmers. However, auditors are responsible for insuring the business financial statements are presented fairly. COBOL processing frequently results in business ledger updates and subsequent financial statements requiring code review by auditors.

A comment recently made in a well known business journal by someone with a suspect agenda was quoted as saying, "COBOL is a computing language used in business and finance. It was first designed in 1959 and is pretty old and slow." A highly experienced business technology person knows the only true part of that last sentence was that COBOL was first designed in 1959.

It's no secret many banks have millions of lines of COBOL on mainframes. COBOL is at the core of how many banks handle the daily money transactions totally transparent to the smart phones involved with initiating those banking transactions.

That is real world!

COBOL that runs in the z/OS Environment is called Enterprise COBOL.


A Comment from Peabody

COBOL is an attention getter on resumes. Hiring authorities and hiring influencers in large organizations running mission critical applications written in COBOL are more likely to spend more time reading a resume after spotting COBOL.


You will learn to recognize COBOL source code

You can complete this challenge without any experience with COBOL.

COBOL source code is provided. The COBOL source code is compiled into an executable module, then executed. The COBOL program reads the BBRI client data set name used in the previous challenge and prints several of the fields from each record.

The compile fails. The compile error is easy to recognize from a review of the COBOL compile output. A successful compile as a result of a modification made to the COBOL source is the first step to completing the challenge.

Following successful compile, program execution fails. The program execution failure is the result of COBOL internal name failing to match the JCL DDNAME. Review of the program execution error messages provide information needed to correct the JCL resuling in successful program execution to complete the challenge.


COBOL for Beginners

Challenge:

Review COBOL source code
  1. Edit z#####.source partitioned data set
  2. Select new empty member name cbl0001, s cbl0001
  3. Copy 'zos.mtm2018.public.source(cbl0001)' into cbl0001
  4. Observe the following:
      4 Divisions
        1 - Identification
        2 - Environment
        3 - Data
        4 - Procedure
      > The first 3 Divisions declare fields used by the program execution logic in the Procedure Division
      > COBOL verbs are English like
      > Asterisk in column 7 results in the line treated as a comment
      > Procedure Division lines 74 and 75 are comments, therefore not executed
        >> The next challenge will execute these statements
        >> Leave lines 74 and 75 as comment statements for now
  5. F3 to save and exit
      You will edit the cobol source again to fix an error found during source code compile

Review JCL used to compile COBOL source and execute COBOL program
  1. Edit z#####.jcl partitioned data set and select, s, member name cbl0001j
  2. Observe the following:
    IGYWCL is a system JCL procedure used to Compile COBOL source code
    //COBOL.SYSIN references the COBOL source code input that you reviewed
    //LKED.SYSLMOD references the executable program created from the compile
    //STEP2 EXEC PGM=CBL0001 is program execution step
      You will edit the JCL again to fix an error found during program execution
  3. submit ; =sd ; st jumping to SDSF status panel

Review CBL0001J JCL job used to compile COBOL source and execute the COBOL program

You should be in the SDSF status panel

Review the JCL job CBL0001J output

  • SYSPRINT DDNAME in CBL0001J output has the COBOL compile messages
  • IGYPS2072-S is a severe COBOL syntax error
  • IGYPS2072-S text explains what needs to be fixed in the COBOL source code

Edit COBOL source, fix error, submit and review output
  1. Edit z#####.source partitioned data set member name cbl0001
  2. Modify COBOL source correcting the code syntax found in error during compile
  3. F3 to save and exit
  4. Submit JCL to compile and execute modified COBOL source code, then review the output
    tso submit jcl(cbl0001j) ; =sd ; st jumping to SDSF status panel

If the compile was successful, then the output shows the program execution failed.
  CBL0001J DDNAME SYSOUT for StepName STEP2 tells the story for the execution failure.

If the compile was unsuccessful, then review compile output for the error, locate and fix the error.


Identify and fix JCL that caused COBOL program execution to fail

Once the COBOL compile step is successful, then the COBOL execution step fails.

  • CBL0001J SYSOUT DDNAME output contains the execution error failure message
    COBOL for Beginners (above) has relevant information about the COBOL JCL relationship
  • You will eventually realize that only 1 fix is necessary
      The fix can be applied to either the JCL or the COBOL source code
      Apply the fix to the JCL

Edit JCL, fix JCL execution error, submit and review output
  1. Edit z#####.jcl(cbl0001j)
  2. Modify JCL enabling COBOL program to successfully execute
  3. Submit modified JCL to compile and execute the COBOL source code, then review the output
    submit ; =sd ; st jumping to SDSF status panel

If the COBOL program execution was successful, then
  Use SDSF XDC command to write CBL0001J PRTLINE DDNAME output to P3.OUTPUT member #04
  Writing PRTLINE output to P3.OUTPUT(#04) is required to get credit

If the COBOL program execution was unsuccessful, then review output for the error, locate and fix the error.


Z#####.P3.OUTPUT(#04) should contain CBL0001J PRTLINE DDNAME output.

Next: Challenge #05

Application Development Support
Part Three - Challenge #05

Background:

What you learned can help others

A developer at your company contacted you and said something is wrong with the BBRI client data. The developer wrote a program to read the BBRI client data. The result was a program execution abnormal end S0C7. Abend S0C7 is a well known failure related to invalid data in a numeric field.


Recreate the reported problem
  1. Edit z#####.source partitioned data set and select, s, a new member name, cbl0002
  2. Copy 'zos.mtm2018.public.source(cbl0002) into cbl0002
  3. F3 to save and exit
  4. Edit z#####.jcl partitioned data set member name cbl0002j
  5. Submit JCL to compile and execute modified COBOL source code, then review the output
    submit ; =sd ; st jumping to SDSF status panel

The compile should be successful and the program execution should result in abend S0C7.

You explain to the application developer that you just completed an analysis of the BBRI client data and found invalid packed decimal fields.


Challenge:

Peabody instructions

Use SORT to remove the invalid packed decimal fields and write the output to a temporary data set.

Pass the SORT temporary data set to be read by the application developer program.

If you follow the instructions below, then you can prove the application developer program S0C7
was the result of the invalid packed decimal records.


Complete the challenge by following Peabody instructions

Note: Consider using cut and paste for 8, 9, and 10

  1. Edit z#####.jcl(cbl0002j)
  2. Delete lines 2 thru 8
      No need to recompile the COBOL source code
  3. Delete the last 3 lines
  4. After ' a ' the JCL JOB operation (line 1), copy sort004 into cbl0002j
  5. Delete line beginning with //SORT004 JOB
  6. Delete line beginning with //BAD
  7. Delete line beginning with OUTFILE FNAMES=BAD
  8. Change //GOOD DD SYSOUT=*
        to //GOOD DD DSN=&&TMP,DISP=(NEW,PASS,DELETE),SPACE=(CYL,1)
  9. Change //PRTLINE DD SYSOUT=*,OUTLIM=15000
        to //PRTLINE DD DSN=&SYSUID..P3.OUTPUT(#05),DISP=SHR
  10. Change //BBRI DD DSN=&MASTER,DISP=SNR
        to //BBRI DD DSN=&&TMP,DISP=(MOD,DELETE,DELETE)
  11. submit ; =sd ; st jumping to SDSF status panel

Success is Z#####.P3.OUTPUT(#05) contains BBRI records written by the application developer program, CBL0002.


If the COBOL program successfully executed, then the program writes output to Z#####.P3.OUTPUT(#05)

Next: Challenge #06

Load Client Records in VSAM
Part Three - Challenge #06

Background:

You will learn how to load data into VSAM KSDS data set type

The term Virtual Storage Access Method (VSAM) applies to both a data set type and the access method used to manage various user data types. VSAM is a high performance data set type and popular for storing critical data.

VSAM is used primarily for applications. It is not used for source programs, JCL, or executable modules.

If you claim experience with z/OS, a perspective employee could potentially ask if you are familiar with VSAM during an interview. The challenge is an opportunity to say yes.

The challenge is to define a VSAM KSDS and load client data from a sequential data set.


VSAM Explained

Review of the documentation below is NOT required to complete the challenge.

However, the documenation is excellent for those wanting to understand how VSAM works and the associated high performance characteristics.


VSAM KSDS Explained

KSDS is defined with a unique key for every data record. The key value makes KSDS different from the other VSAM data types.

Review of the documentation below can assist with challenge completion.


Challenge:

Define the VSAM KSDS

The following Record Layout observations are mandatory to complete the challenge:

  • VSAM KSDS KEY is the Unique Account Number
  • End Column is 170 for all records

The challenge is to define and load data into a VSAM KSDS where you need to determine the correct DEFINE parameters for the VSAM type, key, and recordsize

  1. Edit z#####.jcl partitioned data set member defvsam
  2. Replace @TYPE with VSAM DEFINE parameter to define VSAM KSDS type
  3. Replace @LENGTH,@OFFSET to specify VSAM KSDS key
  4. Replace @MIN,@MAX to specify VSAM KSDS minimum and maximum record length
  5. Submit and review output

If the JCL job is successful, then proceed to Actions to take to complete the challenge.
If the JCL job is unsuccessful, identify and correct the problem.


Actions to take to complete the challenge

The SYSTSPRT output should have a REC-TOTAL greater than 0 for the DATA component of the VSAM cluster
and REC-TOTAL of 1 for the INDEX component of the VSAM cluster.

If SYSTSPRT DDNAME has the newly created data set name attributes,
then use XDC to print SYSTSPRT DDNAME content
Write the SYSTSPRT output into Z#####.P3.OUTPUT data set name
as member name #06

Reminder - Replace Z##### with your ID

Feel free to check your P3.OUTPUT(#06) contains attributes of Z#####.CLIENT.CLUSTER, then move on to the next challenge!

Next: Challenge #07

DB2 for z/OS
Part Three - Challenge #07

Background

DB2 Relational Database


Click here and review first two sections of Reference drop down - DB2 for z/OS

  • DB2 is IBM's Relational Database Technology
  • Understanding SQL is the foundation for learning any relational database management system

You will learn to create a DB2 Table, load data into the table, select rows from the table


Click here and review 3rd and 4th sections of Reference drop down - DB2 for z/OS

  • DB2 for z/OS can be executed a variety of ways
  • DB2 for z/OS Data Structures

Challenge:

Create DB2 Tablespace, Table, and Index

From the ISPF Primary Option Menu, enter d2 , the DB2 Interface Option

DB2I Primary Option Menu SSID must reference the DB2 Sub System ID, DBCG
 If SSID is DBCG, then skip to selecting (1) SPUFI, below
 If SSID is not DBCG, then enter d , the DB2I Defaults

Change DB2 NAME to DBCG on the DB2I DEFAULTS PANEL 1

DB2I DEFAULTS PANEL 2 is displayed - no changes needed - just enter to proceed

Observe SSID value is now DBCG
Select 1 , SPUFI, to process SQL statements

Type 3 changes on SPUFI Display
Input
  1 DATA SET NAME is sql(create)
Output
  4 DATA SET NAME is sql.out
Options
  5 CHANGE DEFAULTS is no

After entering the above information, the following display appears
The message is harmless - ignore - enter to proceed

Default Panel included YES to Edit Input
The SQL statements starting with -- are comment lines
The SQL without -- creates a DB2 tablespace, table, and index
Change all occurrences of ##### to the last five digits of your personal ID
  The display is an example of changing all ##### to 99999 (assuming the personal ID is 99999)
F3 to save and exit the edit session

Display below appears requesting enter to continue

SQL output - create tablespace successful

SQL output - create table successful

SQL output - create index successful


Load Data into your DB2 Table
  1. Edit Z#####.JCL(DB2LOAD)
  2. Change all occurrences of ##### to last 5 digits of your personal ID
  3. Submit ; =sd ; st ... to submit and jump to SDSF Status display
  4. Review DB2LOAD output DDNAME SYSPRINT associated with StepName LOADDB

Success is DSNU1147I ... TOTAL NUMBER OF RECORDS LOADED=45 in DB2LOAD output

If failure, then correct error


Select all rows and columns from your DB2 Table
Use DB2 Interactive panels and select SPUFI to process SQL statements
  • Input DATA SET NAME must be sql(select)
  • Output DATA SET NAME must be sql.out
  • Edit Input must be YES

Edit sql(select) and execute sql select statement

  1. Change all occurrences of ##### to last 5 digits of your personal ID
      SQL statement returns all rows and columns from your table
  2. F3 to exit and save
  3. Enter to proceed with execution of the SQL statement

Select results from your DB2 Table as instructed
Use DB2 Interactive panels and select SPUFI to process SQL statements
  • Input DATA SET NAME must be sql(select)
  • Output DATA SET NAME must be sql.out
  • Edit Input must be YES

Edit sql(select) and add 4 select statements as instructed below

  1. Replicate the select statement line 4 times with line command r4
  2. Comment line 1 select statement with -- starting in column 1
  3. Modify line 2 select statement to return:
      the total number of records in your table
      result is a number
        > investigate SQL COUNT function
  4. Modify line 3 select statement to return:
      the total number of records in your table where ADDRESS3 column is equal to 'Ohio'
      result is a number
        > investigate SQL WHERE clause
  5. Modify line 4 select statement to return:
      a result set with a totalled BALANCE from all records
      result is a number
        > investigate SQL SUM function
  6. Modify line 5 select statement to return:
      a result set with an average BALANCE for all records with 'Ohio' in ADDRESS3 column
      result is a number
        > investigate SQL AVG function
  7. F3 to save and exit
  8. Enter to proceed with execution of the SQL statement
NOTES:
  • Data in the table needs to be searched with the exact case as seen in the table unless SQL case function is applied to the data - such as 'Ohio' - ISPF primary command caps off may be required to retain upper and lower case
  • SQL statements are terminated by a semicolon ( ; )
  • SQL statement can continue on more than 1 line and is terminated by a semicolon ( ; )

Apply currency format to last 2 SQL select statements

The objective is to output the total balance and average balance from the last 2 SQL select statements
in a currency format with a leading dollar sign and commas, $###,###,##0.00

Documentation about the DB2 for z/OS Currency function will prove helpful
DB2 for z/OS Currency

Use DB2 Interactive panels and select SPUFI to process SQL statements
  • Input DATA SET NAME must be sql(select)
  • Output DATA SET NAME must be sql.out
  • Edit Input must be YES

Edit sql(select)

  1. Modify total balance from all records to output in a currency format
      When reading about DB2 for z/OS currency function, the reference to DSN8 is important to note
  2. Modify average balance from all 'Ohio' records to output in a currency format
      The last SQL statement with currency function needs to be continued on a second line
      The SQL processor will continue to read all lines until semi-colon (;) is reached
  3. Enter to proceed with execution of the SQL statement

Complete challenge by writing SQL result into P3.OUTPUT(#07)
  1. Edit sql.out
  2. Overtype line 000001 with c99 and enter primary command replace p3.output(#07)
      Ignore truncation message and enter to proceed

Next: Challenge #08

Java and DB2 API, Application Program Interface
Part Three - Challenge #08

Background:

Java connection and interaction with DB2 relational database table

You are NOT expected to have experience with Java to complete the challenge.

However, the Java code provided includes a working example of Java API to connect for read, write,
and update of a DB2 relational database table if you select to carefully review the syntax.

Challenge #08 assumes you successfully completed previous challenge.


You will learn to:
  • Recognize Java code
  • Compile Java code
  • Execute Java code
  • Modify Java code based upon recognizable Java code pattern

Several obstacles and tasks will be encountered to complete the challenge:
  • Copy Java code from partitioned data set to unix file
  • View Java compile failure related to insufficient virtual storage memory
  • Increase TSO virtual storage to complete Java compile
  • View Java execution failure related to authentication
  • Modify Java code correcting issue with authentication failure
  • Java program execution from Unix shell prompt
  • Java program execution using JCL

Challenge:

Copy Java code from partitioned data set to unix file
  1. Jump to ISPF Command Shell panel =6
  2. oput 'zos.mtm2018.public.source(db2jdbc4)' 'db2jdbc4.java'

View Java compile failure related to insufficient virtual storage memory
  1. Jump to Unix Services command shell prompt =u
  2. javac db2jdbc4.java

Carefully reading the failure diagnostics written to the display indicates insufficient virtual storage.


Increase TSO virtual storage to complete Java compile
  1. Logoff ISPF/TSO
  2. Logon to TSO/ISPF with modification to SIZE value on TSO/E LOGON display
      Change value from 32768 to 262144

View Java execution failure related to authentication
  1. Jump to Unix Services command shell prompt =u
  2. javac db2jdbc4.java
  3. java db2jdbc4

Carefully reading the failure diagnostics written to the display indicates connection authorization failure.


Modify Java code correcting issue with authentication failure
From Unix Services shell prompt
  1. oedit db2jdbc4.java
  2. find and change userid, z#####, and wrong password, wrongpwd, to your valid userid and password
  3. f3 to save and exit
  4. javac db2jdbc4.java
  5. java db2jdbc4
If the authentication failure message does not appear, then you successfully resolved the authentication failure. However, execution produced a DB2 SQL Error. Go to next twisty.

Modify Java code correcting issue with DB2 SQL Error

Carefully read the DB2 SQL error that includes SQLERRMC=value
 The value is NOT your table created in the previous challenge
 Read the incorrect table value very carefully
 The value must be an identical match to the table name you previously created and loaded

From Unix Services shell prompt

  1. oedit db2jdbc4.java
  2. find and change the table name to your table from previous challenge
  3. f3 to save and exit
  4. javac db2jdbc4.java
  5. java db2jdbc4

If the output looks good, then exit from the Unix shell prompt and return to ISPF.


Java program execution using JCL

Execute the db2jdbc4 java program using JCL which writes output to Z#####.P3.OUTPUT(#08)

tso submit 'zos.public.jcl(db2jdbc4)'

Feel free to check the JCL job for successful completion and the Z#####.P3.OUTPUT(#08) for the output previously displayed when java program was executed from Unix shell prompt.


Next: Challenge #09

COBOL and DB2 API, Application Program Interface
Part Three - Challenge #09

Background:

COBOL connection and interaction with DB2 relational database table

You are NOT expected to have experience with COBOL to complete the challenge.

The COBOL code provided includes a working example of COBOL API (EXEC SQL ...) to connect to your DB2 relational database.

Challenge #09 assumes you successfully completed challenge #07 where you created and loaded a DB2 relational database table.


You will learn to:
  • Recognize COBOL code
  • Compile COBOL code using JCL
  • Execute COBOL code using JCL
  • Modify COBOL code based upon recognizable COBOL code pattern

Several obstacles and tasks will be encountered to complete the challenge:
  • View COBOL compile failure related to a misspelled internal file name
  • Modify COBOL code correcting compile failure
  • View COBOL execution issue related to no data written
  • Modify COBOL code correcting issue with no data written

Challenge:

View COBOL compile failure related to a misspelled internal file name
  1. Edit Z#####.SOURCE
  2. From the PDS command line enter s db2cbl to create new empty member
  3. From ISPF editor primary command line enter copy 'zos.mtm2018.public.source(db2cbl)'
  4. submit ; =sd ; st to:
      JCL is included in the db2cbl member that reads and compiles the COBOL source code displayed
      Pre-compile and compile the COBOL code
      Jump to SDSF status panel to review compile output
  5. Use ? to view the JCL JOBNAME DB2CBL DDNAMEs
      The compile failed with return code (RC) of 12
      DDNAME SYSPRINT from ProcStep COBOL consists of the compile details and failure message
      Compile output is long because the pre-compiler inserted code for each EXEC SQL statement
  6. Enterprise COBOL messages begin with IGY - f igy to find COBOL messages in the compile output
      The first message beginning with IGYPS2122-S is a severe message indicating the real problem
      The subsequent IGY messages ending with -W are warning messages resulting from the severe error
  7. Study the message text
      The message text identifies the code correction needed

Big hints
 Only 1 character is involved that created the problem
 Look in COBOL PROCEDURE DIVISION and examine OPEN statements
 Is the correct filename being opened?


Modify COBOL code correcting compile failure
  1. Edit Z#####.SOURCE
  2. From the PDS command line enter s db2cbl
  3. Use ISPF editor to correct the error in the COBOL source code
  4. submit ; =sd ; st to:
      Pre-compile and compile the COBOL code
      Jump to SDSF status panel to review compile output
  5. If the compile is successful, then proceed to the next twisty
      Return Code of 4 is expected and normal
  6. If the compile failed, then identify and correct COBOL code syntax error

Remember the big hint - removal of a single character in the COBOL will fix the problem

If needed you can delete all the lines of the COBOL code and copy in the original COBOL code again


View COBOL execution issue related to no data written
  1. Submit COBOL program execution
    From ISPF of SDSF command line enter tso submit 'zos.public.jcl(db2cblr)'
      The JCL executes the COBOL program which is intended to:
        - read from your DB2 relational database table
        - write selected fields to filename REPORT
      The program execution JCL REPORT DDNAME references to Z#####.P3.OUTPUT(#09)
  2. View Z#####.P3.OUTPUT member #09
      Member #09 is empty
      Unfortunetly, the JCL execution of the program completed with RC = 0 which is no help

Note: Big hint from above - read from your DB2 relational database table

What is the name of your DB2 relational database table?

Proceed to the next twisty


Modify COBOL code correcting issue with no data written
  1. Edit Z#####.SOURCE member name DB2CBL
  2. Find the SQL select statements in the COBOL source code
      What is the table name in the code?
      Study all EXEC SQL statements for table name
      What is your table name?
  3. Modify the code to read from your table name
  4. Compile the modified COBOL code
    submit ; =sd ; st to:
      Pre-compile and compile the COBOL code
      Jump to SDSF status panel to review compile output
  5. If the compile is successful, then execute program
      From ISPF or SDSF command line enter tso submit 'zos.public.jcl(db2cblr)'
      View Z#####.P3.OUTPUT(#09) upon completion of JCL JOBNAME DB2CBLR
  6. If Z#####.P3.OUTPUT(#09) has the report - you are done with the challenge - Congratulations!
  7. If Z#####.P3.OUTPUT(#09) is still empty - you need to review COBOL code again

The challenge actions are the actions of a mainframe developer. The only difference is the developer might be using a DevOps GUI instead of text based ISPF, SDSF, and DB2 Interactive facilility. Using the text based TN3270 interfaces will result in proficiency with any DevOps GUI.

Next: Challenge #10

Locating Invalid Packed Decimal Data
Part Three - Challenge #10

Background:

Guided by sparse instructions, you will apply what you learned in previous challenges

A review of part 3 challenge #03 will help you complete challenge #10.

Challenge #03 used JCL to execute program ICETOOL to display and verify packed decimal format in the account limit and account balance packed decimal fields of each record in ZOS.PUBLIC.BBRI.CLIENTS.

Locate the part 3 challenge #03 JCL execution of program ICETOOL used display and verify packed decimal fields in ZOS.PUBLIC.BBRI.CLIENTS.

The challenge #10 instructions assumes you are aware of the JCL used in challenge #03.


Useful Information

You will see the challenge instructions are very sparse by design. A work scenario might be that a business analyst, auditor, or your supervisor gives you, the experienced technician, an assignment where they have no idea how the assignment is completed.

If you investigated part 3 challenge #03 JCL, then be aware that only VERIFY is needed to complete the assignment. DISPLAY is NOT needed. VERIFY produces a return code 12 as a result of finding invalid packed decimal. However, the invalid packed decimal records are written in JCL job output.

The sparse instructions will force you to put a few things together using skills acquired from the previous challenges.

Challenge:

Identify every invalid packed decimal record found within 10,000 records

ZOS.MTM2018.PUBLIC.PACKED has 10,000 records.

Each record is a single packed decimal field starting in column 1 with a record length of 11 bytes.

Several of the packed decimal records in ZOS.MTM2018.PUBLIC.PACKED are invalid.

Your challenge is to write a report to P3.OUTPUT(#10) identifying every invalid packed decimal record found in ZOS.MTM2018.PUBLIC.PACKED data set.


Congratulations!
Accomplishing challenge #10 just proved how much you learned about navigating your way around a z/OS environment.
You can say you have experience with z/OS.

Browse or View P3.OUTPUT(#10) and verify information you expected, then move on to the next challenge!

Next: Challenge #11

Run C Fun
Part Three - Challenge #11

Background:

C program source is used to demonstrate z/OS flexibility

z/OS environment includes MVS data sets and Unix files.
MVS was the z/OS grandfather operating system.
MVS excluded the Unix component.
 Therefore, MVS excluded Unix files.
 In z/OS, 'MVS data sets' and 'Unix files' are separate and unique.

While MVS and Unix are technically 2 separate operating systems, z/OS is a blend of both.
 Executable programs can be in MVS data sets or Unix files.
 Executable programs can simultaneously read and write MVS data sets and Unix files.
 Executable programs can be copied between MVS data sets and Unix files.
 The above is true for all compiled programming languages.

Challenge #11 uses C program source code to demonstrate flexibility of z/OS.

C program source is provided with comments explaining the code.

You will make simple modifications to the C program source code.

You do not need to be proficient with C programming languange to figure out the modifications. However, the challenge is opportunity to become familiar with C programming language.


Challenge:

Copy C program to your Unix directory
From ISPF enter the following to launch Unix shell prompt:
tso omvs

Copy the C program source to your Unix directory:
cp "//'zos.mtm2018.public.source(cpgm)'" cpgm.c

Compile C program from Unix shell prompt

Compile C program source creating executable in your Unix directory:
xlc -o cpgm cpgm.c

Execute the C program module from Unix shell prompt:
./cpgm

The C program counted from 1 to 10, writing each number to the display and wrote a message in Unix cpgm.output

Review cpgm.output to read the message
cat cpgm.output

Write the cpgm.output to an MVS partitioned data set member
cp cpgm.output '//pds.data(cmsg1)'


Modify and Compile Unix C program

Edit C program source in your Unix directory:
oedit cpgm.c

Observe the following:

  • /* is a comment line where the */ is the end of the comment
      Take the time to read the comments and the C code below each comment
      You may be able recognize how 1 to 10 is written to the display
      and how the text message is written to cpgm.output
  • Line 26 to 29 explains writing text message to a JCL DDNAME when the program is executed using JCL
     The specific JCL DDNAME is in the C code
Modify the C source code:
from
"My first C program on z/OS"
to
"Fail fast to succeed!"

F3 to save and return to Unix shell prompt

Compile C program source creating executable in your Unix directory:
xlc -o cpgm cpgm.c

Execute the C program module from Unix shell prompt:
./cpgm

Review cpgm.output to read the message
cat cpgm.output

Write the cpgm.output to a different MVS partitioned data set member, cmsg2
cp cpgm.output '//pds.data(cmsg2)'


Copy C executable module from Unix file system to MVS data set

From Unix shell prompt:
cp cpgm '//load(cpgm)'

Return to ISPF session
exit
enter


Execute MVS data set C program executable using JCL

JCL is available to compile C program source. However, JCL to compile the C program will not be used in the challenge.

The C program source was already compiled into an executable module from the Unix shell prompt and copied to an MVS data set. JCL can be used to execute the C program executable copied to the MVS data set without recompiling.

Observe the following in the JCL below:
  • CPGM is the program to be executed
  • STEPLIB DD tells the system where to search first for CPGM
     You copied CPGM from the Unix directory to your MVS LOAD data set
  • HANDLER DD is coded in the JCL
Submit the JCL from the TSO/ISPF environment and review the JCL job output using SDSF
tso submit 'zos.public.jcl(cpgmjcl)'

While TSO/ISPF environment was used to submit the JCL, the C program code is currently writing text message to a file in your unix directory, cpgm.output

The objective is to change the C program source code to write the text message to JCL HANDLER DD instead of cpgm.output

To accomplish the objective, a modification and subsequent execution of the C program is required to write to JCL HANDLER DD. You will learn several z/OS tricks to accomplish the objective.


Complete the challenge while learning new z/OS tricks

Back to the Unix shell prompt
tso omvs

Edit the C program source code
oedit cpgm.c

Observe the following in the C program source:

  • Locate C statement used to write text to cpgm.output
  • Locate C statement used to write text DD:HANDLER
  • Comment statement used to write text to cpgm.output
  • Uncomment statement used to write text DD:HANDLER
  • F3 to save and return to Unix shell prompt
Compile the modified C program source code
xlc -o cpgm cpgm.c

If compile fails, then correct error and recompile.

Write the cpgm executable to an MVS partitioned data set member
cp cpgm '//load(cpgm)'

From the Unix shell prompt - submit the JCL to execute CPGM writing text to HANDLER DD
submit "//'zos.public.jcl(cpgmjcl)'"

Verify the C program wrote the text message into P3.OUTPUT(#11)
cat '//p3.output(#11)'

If p3.output(#11) has the text message, then you successfully completed the challenge.

If p3.output(#11) is empty, then exit back to ISPF sessions and use SDSF to view JCL job output.
Locate and correct problems.


You learned a few new z/OS tricks in the challenge that other experienced z/OS technicians might be unaware of.

Next: Challenge #12

IBM Z Mainframe Supports 5 Unique Operating Systems
Part Three - Challenge #12

Background:

The contest z/OS is a virtual machine controlled by a single LPAR running z/VM

IBM Z is computer hardware, the mainframe
IBM Z supports 5 unique operating systems:
  1. z/OS - flagship operating system used for this contest
  2. Linux - if you know Linux, you know Linux that runs on IBM Z
  3. z/VM - hypervisor operating system
  4. z/TPF - Transaction Processing Facility
  5. z/VSE - similar to z/OS with less features and functions
If you want to read more about these operating systems:
IBM Z Operating Systems

IBM Z supports 2 types of hypervisors:
  1. LPAR - Logical Partition, a type 1 hypervisor
  2. z/VM - z/Virtual Machine, a type 2 hypervisor
If you want to read more about hypervisors:
Types of Hypervisors


IBM Z unparalleled server capability
  • LPAR hardware hypervisor is assigned CPU's, Memory, and Peripheral Devices such as disk, network, tape, etc, from the total available resource pool.
  • Any of the 5 operating systems can run in an LPAR.
  • A single IBM Z is capable or running up to 85 LPARs.
  • z/VM is a software hypervisor.
  • Any of the 5 operating systems can be a guest virtual machine within the z/VM environment.
  • It is common to use z/VM hypervisor to run 100's and even 1000's of Linux operating systems.
  • Communication between the operating systems in the IBM Z frame eliminates the requirement for extra cables and the response time between operating systems is near zero.
  • Running 8,000+ operating systems within a single IBM Z frame with network delay between the operating systems near zero is industrial strength architecture.

Information about the contest IBM Z mainframe

While previous years' contests exposed contestants to other IBM Z operating systems, 2018 contest is all z/OS. However, the contest z/OS is running as virtual machine under z/VM where the z/VM is running in one of several LPARs on the contest IBM Z hardwere - contest system is using a very small fraction of the IBM Z frame.

As a result of the contest z/OS running as a virtual machine under z/VM, it is possible to 'query' z/VM from z/OS.

If you want free access to Linux running on IBM Z:
Start your trial now

z/VM query command output in preparation for challenge
From ISPF/TSO =6 panel (ISPF Command Shell), enter the following z/VM Query commands:
  • q cplevel
      z/VM Operating System Level hosting the contest z/OS virtual machine
  • q n
      Number of virtual machines currently active as guests of z/VM
  • q nic
      Network Interface Controller
      Observe the NIC Adapter device number (400) and the NIC Adapter Name
        Write down the NIC Adapter Name - you will need it to complete challenge
    The NIC adapter device number is the first of three z/VM device addresses used to
    communicate with z/OS virtual machine
  • q 400-402
      z/VM defined NIC Adapter Devices 400 to 402

Challenge:

Gather z/OS system definitions used to communicate with z/VM hypervisor
The following information is available from the z/VM query commands:
  • z/VM NIC adapter device addresses 400-402 are used to communicate with z/OS
  • z/VM NIC adapter name is known - you were asked to write it down previously

From ISPF

dslist 'vendor.tcpparms'
  1. View 'v' vendor.tcpparms partitioned data set
  2. Select 's' member name S0W1
      The data is the z/OS TCPIP definitions which includes the z/OS HOME IP address and NIC adapter name
      No worries - any attempt to save changes will fail due to read-only authority
  3. Delete all lines except the 3 lines with the NIC adapter name
  4. After 'a' the third and last line, enter ISPF edit primary command
    copy 'lvl0.vtamlst(osatrl)'
      You are looking at additional z/OS definitions used to establish connection with z/VM
  5. Type ISPF line command c99 over top of the first line number and enter ISPF primary command
    rep p3.output(#12) to copy all lines to p3.output(#12)
  6. Enter ISPF edit primary command cancel to exit view session.

If done correctly, p3.output(#12) has 7 lines consisting of z/OS definitions used to connect to z/VM.


Great progress! Only 3 more challenges to be a candidate for winner or honorable mention status.

Next: Challenge #13

IBM Z Mainframe Assembler
Part Three - Challenge #13

Background:

The challenge exposes you to IBM Z Assembler Language

Some large companies need programmers that understand assembler language.

These technical positions pay well and lead to promotions in the technical ranks.

Familiarity with IBM Z assembler on a resume is a major attention getter for securing an interview.

You can say you have familiarity with IBM Z assembler as a result of completing the challenge.

Do not let the technical details in the challenge scare you away.

By the end of the challenge you will realize you are capable of beginning to understand the technical details of how computer software works.


Learning to be an assembler programmer takes significant time and repetition.

Learning assembler is more difficult than learning other programming languages.

Assembler requires a programmer to learn about:

  • Assembler mnemonics
  • Machine instructions
  • Assembler directives
  • Assembler macros
  • Hardware architecture

IBM Z Assembler coding and debugging requires:

  • Decimal/Hexadecimal conversion
  • Hexadecimal arithmetic applied to memory addressibility
  • Binary format representation and binary arithmetic such as two's complement

A benefit of understanding assembler is the ability to debug complex system problems by reading system dumps.

Only a small number of developers and system programmer are proficient with assembler.
However, those familiar with assembler possess a deeper understanding of the operating system technology and ability to write high performance code.

A humorous youtube video related to the above statement follows:
  "The code I write runs on the mainframe."


A few comments about what you are about to learn
  • The majority of IBM Z jobs and careers do NOT require proficiency with IBM Z assembler
  • Large enterprise management requested assembler exposure in the Master the Mainframe contest
  • Past Master the Mainframe participants have careers working directly with assembler in IBM Z enterprises
  • The challenge will not be as difficult as you might imagine
  • The challenge instructions enable you to successfully interpret requested changes to the ASMPGM code
  • Assembler is not for everyone
  • Assembler requires near obsessive attention to the smallest details
  • Assembler proficiency enables a capability to debug complex system problems
  • Large enterprises have assembler routines for critical high volume, high frequency processing requiring highest possible performance - someone must understand and support those assembler programs
  • The challenge exposes you to the details of assembler because:

      * Some of you just might learn you enjoy dealing with the details of assembler

      * If you are one of these people with an affinity for assembler, a job is waiting for you
        You need to let employers know you enjoy the details of IBM Z assembler
        and want to grow your assembler proficiency

      * If you are NOT one of these people with an affinity for assembler, you will be exposed to
       the hidden details behind all computer operating systems and higher level programming languages

Preparation

A relatively simple assembler program will be used and explained.

Each computer architecture has machine instructions unique to the architecture. All computer languages supported by the architecture must be translated into the unique machine instructions of the underlying computer architecture. Each computer architecture has an assembly language which includes mnemonics that are assembled into machine instructions understood by the computer. Compilers and interpreters translate supported computer languages into the unique machine instructions understood by the hosting computer.

Computer processing memory is used to load and store the machine instructions and data for processing. The operating system keeps track of processing memory locations using addresses where some of the memory is free, some of the memory has machine instructions, and some of the memory has data.

Higher level languages such as C/C++, Java, COBOL, etc. were created to make programming the computer easier by hiding the complexity of the underlying machine instructions, addressable memory, and registers. Registers are at the top of the memory hierarchy, and provide the fastest way to access data.

IBM Z mainframe computer architecture, z/Architecture, is Complex Instruction Set Computing, CISC.

The assembler code that follows is explained in greater detail using the assembly compile output.

Figure 1. is assembler source code.

Outlined in red is assembler code responsible for "standard linkage",
a technique for passing data and processing control from a caller program to a called program.

Read the comments to the right of the assembler mnemonics.
Figure 1.
Figure 2. is the same assembler source code.

Assembler mnemonics to be executed, the program body.
Figure 2.
Figure 3. is the same assembler source code.

Assembler code defining program constants, data in processing memory storage.
Figure 3.
Figure 4. is the same assembler source code.

Assembler code restoring caller program registers and returning control to the caller program.
Figure 4.

Challenge:

Compile assembler program
  1. edit Z#####.SOURCE
  2. select a new member name
    s asmpgm
  3. copy 'zos.mtm2018.public.source(asmpgm)'
  4. submit
  5. jump to SDSF and verify the assembler program compile was successful
    =sd ; st

Review of assembler compile details

SDSF review of output for ASMPGM, DDNAME SYSPRINT and ProcStep C, should match the following images.

Observe the following in the image below:
  • Loc - abbreviation for location, program location column
  • Object Code - machine instructions column. commonly called op codes
  • Addr1 - memory address location column
  • Addr2 - memory address location column
  • Stmt - line numbers associated with each line of code
  • Source Statement - assembler code labels, mnemonics, and mnemonic operands
  • Stmt 2 is the first assembler code line where -
    Loc 00000 represents the beginning location
    Addr1 00000 Addr2 000FD represents the starting and ending location of the program in hexadecimal
       -- effectively the program length in bytes - x'FD' or 253 decimal
     ASMPGM is a user chosen label
     CSECT is an assembler directive declaring a Control Section
  • Stmt 3, 4, 5 are comments
  • Stmt 6 to 11 show user selected label names equated (EQU) to computer register numbers

Below is assembler code frequently reused for "standard linkage",
store the location and register content of the caller program to return control when done.

Stmt 18 includes assember mnemonic B, a branch.
  The operand is SETUP, a program label, a quick way to resolve addressable location in memory.

The left of Stmt 18 has an op code that begins with 47, which is the op code for mnemonic B, branch.

Stmt 18 Addr2 is 00014.
  Observe Loc 00014, Stmt 22, is label SETUP with more assembler code to execute.

While the explanation below is elaborate, it is just preparation for you to see these changes happen at breakpoints during program execution later in the challenge.

The program body includes -

  • Stmt 34, op code beginning with x'58', L, Load register 2 with characters 'Begin'
  • Stmt 35, op code beginning with x'41', LA, Load Address register 2 with address of 'Begin' address location
      You will see the register content difference between the 2 instructions later.
      You will might notice the Addr2 is 000F8 memory address location for 'Begin'
    =C'Begin' resulted in assembler assigning a memory address location for characters Begin
  • Stmt 37, op code beginning with x'1B', is mnemonic SR, subtract register 2 from itself
  • Stmt 38, op code beginning with x'58', is mnemonic L, load 4 into register 2
  • Stmt 39, op code beginning with x'58', is mnemonic L, load 1 into register 3
  • Stmt 42, op code beginning with x'5A', is mnemonic A, add 1 to register 3
  • Stmt 43, op code beginning with x'46', is mnemonic BCT, decrement register 2 by 1 and branch to the label loop until register 2 is zero
  • Stmt 45, op code beginning with x'48', is mnemonic LH, load halfword into register with content of memory location assigned to HALFCON label
  • Stmt 46, op code beginning with x'5A', is mnemonic A, add memory location assigned to FULLCON label into register 3
  • Stmt 47, op code beginning with x'50', is mnemonic ST, store register 3 in memory location of HEXCON

Below is commonly reused code for 'standard linkage', restoring the caller program registers.

Observe Stmt 56 with 'WTO'
  Left is blank - no op code, no operands, and no addresses
  WTO, abbreviation for Write To Operator, is an assembler macro
  The text following WTO is written to the system log

Below observe Stmt 58 to 64 with a '+' following the statement number
  58 to 64 is the WTO macro expanded code

Observe Stmt 65 with op code beginning with x'07' associated with mnemonic BR, branch
  The address location represented by label RETREG is register 14
  where register 14 contains the address location of the caller program.
  So, the execution result is a branch to an address location of the caller program.

Below is assembler defined constants with assembly assigned addressable memory locations

The op code area is content at the addressable memory location when the program starts execution.

A few observations -

  • Label SAVEAREA at location 98 into the program is 18 full words in length
  • Label FULLCON at location EO into the program is 1 full word in length
  • Label HEXCON at location E4 into the program is a hexadecimal length of 4.
  • Label HALFCON at location E8 into the program is a half word where of decimal value H'32'
      but inspection of the stored value in memory is x'20'
  • Program body included =F'4', =F'1', and =C'Begin',
      where the = resulted in the assembly to machine code assigning addressable locations
      for the values at the end of the executable program, F0, F4, and F8, respectively.
Calculator to convert between hexadecimal and decimal (if you need it)

Use TSO TEST facility to understand assembler program execution

TSO TEST facility is used to execute a program with the added capable to stop the program execution at chosen address locations to inspect changes in registers and changes in other address locations in the program.

The TSO Ready prompt is required to use the TSO TEST facility.

If ISPF =x terminates both ISPF and automatically logs off TSO, stopping you from getting to the TSO Ready prompt, then revisit Part 2, challenge #01 instructions.

Once in the TSO Ready prompt, the commands below can be copied and pasted when instructed to enter the commands.

Consider opening a separate browser tab to view the ASMPGM compile output (seen above in the section
'Review of assembler compile details') as you study how the assembler program works using the TSO TEST facility.

  1. test 'z#####.load(asmpgm)'
      --- you must replace z##### with your ID
      Enter the above command to load your assembler program, ASMPGM, into the TEST facility

  2. listpsw
      Enter the above command to list the current address location of ASMPGM
      ASMPGM address location is under the INSTR ADDR column

  3. l 0r:15r
      Enter the above command to list the 'current' content of the 16 registers, 0-15
      Observe register 15 is the address of ASMPGM which will be executed shortly
      Register 14 is the address of TSO Ready environment which called TEST facility
      When TEST facility is ended, control is returned to the address in register 14

  4. l 11f00. length(256)
      Enter the above command to list the content starting at 'absolute' address location 11F00
      Observe the content is machine instructions and data from the compile output
      Example, the first byte, x'47' machine instruction (op code) was created by the branch, B mnemonic at Stmt 18

  5. l 11f00. length(256) c
      Enter the above command to list the content starting at 'absolute' address location 11F00 in character format
      Observe the literal text embedded in the assembler program
      The first instruction in the program was to branch around the literal "eye catchers" embedded in the executable program

  6. l +0 length(256)
      Enter the above command to list the content starting 'relative' address location 0
      Observe content is the same as listing 'absolute' address location starting at 11F00
      The program executable area can be referenced by either 'relative' or 'absolute' addressing

  7. at +14 (l 0r:15r)
      at +14 is Stmt 22 -- SETUP label and STM assembler mnemonic
      Stopping at +14 means the instruction at +14 is NOT executed until proceeding past +14 location
      Enter the above command to stop program execution at 'relative' address location 14, then
      - go to list content of all registers

  8. at +28 (l 0r:15r)
      at +28 is Stmt 34 -- L 2,=C'Begin' to load register 2 with content of character string 'Begin'
      Enter the above command to stop program execution at 'relative' address location 28, then
      - go to list content of all registers

  9. at +2C (l 2r)
      at +2C is Stmt 35 -- LA 2,=C'Begin' to load register 2 with address location of character string 'Begin'
      Enter the above command to stop program execution at 'relative' address location 2C, then
      - go to list content of register 2 which now contains the result of L 2,=C'Begin'

  10. at +30 (l 2r;l 11FF8. length(5) c)
      at +30 is Stmt 37 -- subtract register 2 from itself, SR 2,2, filling register 2 with zeroes
      Enter the above command to stop program execution at 'relative' address location 30, then
      - go to list content of register 2 containing result of LA 2,=C'Begin'
      Observe register 2 contains an 'absolute' address location, then the 'absolute' address location is listed
      The content of the 'absolute' address location is displayed

  11. at +32 (l 2r)
      at +32 is Stmt 38 -- load register 2 with the number 4, L 2,=F'4'
      Enter the above command to stop program execution at 'relative' address location 32, then
      - go to list content of register 2 containing zeros as a result of the previously executed SR 2,2

  12. at +36 (l 2r)
      at +36 is Stmt 39 -- load register 3 with the number 1, L 3,=F'1'
      Enter the above command to stop program execution at 'relative' address location 36, then
      - go to list content of register 2 which has result of L 2,=F'4'
      Observe register 2 changed from 0000000 to 0000004 as the result of L 2,=F'4'

  13. at +3A (l 2r:3r)
      at +3A is both Stmt 41 and Stmt 42 where:
      - Stmt 41 has label LOOP at the +3A Defined Storage location, LOOP DS 0H
      - Stmt 42 results in add 1 to register 3, A 3,=F'1'
      Enter the above command to stop program execution at 'relative' address location 3A, then
      - go to list content of registers 2 and 3
        where registers 2 equals 00000004 and register 3 equals 00000001 first time through the loop
      The program execution is designed to branch back to the +3A location,
        therefore, +3A location stopping point will be executed again

  14. at +3E (l 2r:3r)
      at +3E is Stmt 43 -- branch on count, BCT 2,LOOP
      Enter the above command to stop program execution at 'relative' address location 3E, then
      Each BCT execution results in decrement of register 2 by 1
      The result of BCT 2,LOOP is to branch to label LOOP at +3A until register 2 is zero
      The next stop is at +3A, storage address location of label LOOP adding 1 to register 3 until register 2 is zero
      - Enter the following commands to be executed when register 3 is zero, terminating the loop
        at +42
        at +46
        at +4A
        at +94

    go to list content of registers 2 and 3, then branch to LOOP
        Once register 2 is zero, then execution will stop at +42
          ** You will need to enter go numerous times to proceed with program execution

  15. When execution stops at +42, then
    l 2r:3r
       Register 2 and 3 show the final results of the loop
       Register 2 contains 00000000 as a result of BCT count decrement during each loop execution
       Register 3 contains 00000005 as a result of adding 1 during each loop execution
    l +e8
       Location +E8 has the content of HALFCON
       HALFCON is defined as a halfword, 'H', therefore the first 4 bytes, 0020 represents the halfword
    go to continue execution

  16. When execution stops at +46, then
      Stmt 45 -   STOP1   LH 3,HALFCON  was just executed
    l 3r
       Register 3 is a full word, therefore load halfword, 'LH', resulted in register 3 containing 00000020
    l +E0
       Content of value FULLCON is displayed, 'FFFFFFFF'
       However, the assembler Define Constant statement is DC F'-1'
       Why? FULLCON is an example of Two's Complement
       Two's Complement Explained
       For the purpose of computer arithmetic operation, FULLCON is -1
    go to continue execution

  17. When execution stops at +4A, then
      Stmt 46 -   STOP2   A 3,FULLCON  was just executed
    l 3r
        Register 3, 0000001F, is the result of adding x'20' to x'-1'
      Before continuing with program execution, list value of address location for HEXCON (+E4)
       l +E4
       Observe address location currently shows 00009ABC
    go to continue execution

  18. When execution stops at +94, then
      Stmt 47 -   STOP3   ST 3,HEXCON  was just executed
       ST 3,HEXCON stores the content of register 3 into address location HEXCON
    l 3r
       Register 3 still contains the result of the previous add operation unaltered by ST op code
    l +E4
       HEXCON address location was written over using the ST, Store, op code with content of Register 3
    go to continue execution

    The above go resulted in ASMPGM program termination returning control to caller TSO TEST facility
    Enter end to terminate TSO TEST facility, returning control to caller TSO

Return to ISPF by entering ISPF


Modify and re-compile ASMPGM assembler program

Edit z#####.source member name ASMPGM

  1. Use register 6 for all operations where register 2 was previously used
  2. Use register 7 for all operations where register 3 was previously used
  3. Initialize the register used to sum each add operation in the loop with a zero value
  4. Execute the loop 10 times adding 5 to the register being used to sum each add operation

Submit and verify results via SDSF and potentially using TSO TEST to see if ASMPGM is executing as you expected

Important: If you use TSO TEST to validate your ASMPGM is behaving as you expected, remember the register used to store the sum of the arithmetic add operation is in a hexadecimal value.


Action needed to get credit for the challenge

From ISPF command line, enter tso submit 'zos.public.jcl(p3ch13)'

The above JCL job copies your modified ASMPGM source code to P3.OUTPUT(#13)


If a person says to you, "It is not possible to Master the Mainframe by completing the contest". You can respond, "Well, I did learn it takes experience and repetition to truly Master the Mainframe. However, I also became familiar with the details of IBM Z assembler and modified assembler code during the contest."

Challenge #13 was a lot of work.

For your amusement - "I asked my manager about a mainframe you mentioned."

Next: Challenge #14

Rexx
Part Three - Challenge #14

Background:

  Rexx Programmers Reference

What is Rexx?

Rexx is a very underrated programming language; elegant in design, simple syntax, easy to learn, use and maintain, yet as powerful as any other scripting language available today.

Rexx is available for every OS.

If you find yourself supporting a large enterprise z/OS in the future, you will encounter Rexx routines used to automate many tasks. Those encountering Rexx quickly appreciate the above first statement. However, z/OS Rexx is more than a scripting language with all the benefits of any scripting language. z/OS Rexx can be compiled into machine code for high performance. Compiled z/OS Rexx is used to build business applications and z/OS software products.

Many thousands of IDs, security permissions, data sets, and unix directories are required for the contest. A Rexx routine is used to build the thousands of IDs, security permissions, data sets, and unix directories. A Rexx routine makes it possible to complete these tasks very quickly.

The following is valid Rexx code:
/* Rexx */
say 'hello world'

Rexx has a small number of language keywords and significantly larger number of built-in functions.

Rexx execution is flexible-

  • ISPF direct execution
  • TSO Ready prompt direct execution
  • Unix shell prompt direct execution
  • JCL execution
  • Any program language can execute compiled Rexx

Information needed to complete the challenge

The challenge involves reading and interpreting Rexx code.

The Rexx code supports 4 types of statements

  1. Functions
  2. Instructions
  3. Built-in functions provided by the specific processing facility
    See Chapters 3 and 4
  4. Commands available to the specific processing facility
    See Chapter 10

Rexx functions and instructions are available to all operating systems.

z/OS TSO/E is the specific processing facility in the challenge. All z/OS TSO/E commands are available to Rexx. The suggested Chapter 10 source of information above does not cover all the z/OS TSO/E commands. Chapter 10 only covers TSO/E commands created specifically for Rexx, such as EXECIO which is in the challenge Rexx code.

Sources of information for additional Rexx programming constructs used in the challenge code

  1. Basic Syntax
  2. Strings
  3. Arrays

There are many excellent internet sources of information for Rexx such as
from a small company in UK and Introductory Rexx Tutorial

Challenge:

Get Rexx code
  1. Edit z######.source
  2. Select empty member name slots - s slots
  3. Copy code into empty member - copy 'zos.mtm2018.public.source(slots)'
  4. F3 key to end, save, and return to z#####.source directory of members

Execute, debug, correct Rexx code, and complete the challenge

While in z#####.source directory list
  Enter ex to left of member name slots to execute the Rexx code.
  Observe Rexx syntax error. The error message provides the line number.

Edit member slots, correct the Rexx function syntax error, and F3 to save changes.

  Enter ex to left of member name slots to execute the Rexx code.
  If the first syntax issue is resolved, then observe a fruit color fails to show in the middle window.

Edit member slots, correct the syntax problem enabling fruit color to appear in middle window, and F3.

  Enter ex to left of member name slots to execute the Rexx code.
  Follow the instructions.

Once you win, you will be instructed to read the slots Rexx code to complete the challenge successfully.


You possess significant z/OS experience by completing these part 3 challenges. Completing the last challenge places your in contention for the winner circle or the honorable mention circle. These are prestigious positions in the Part 3 Wall of Fame drawing the attention of employers.

Next: Challenge #15

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

Scoring and Selecting Winners
Part Three - Complete

Congratulations!

Completing Part 3 makes it highly probable your name and school will be posted in Part 3 Wall of Fame. This is a distinguished and relatively short list. You will be in this list at least as an Honorable Mention and possibly as a top place winner.

How can I know if I have everything 100% accurate?

Bottom line: You cannot.
  No routine is provided to score the answers you submitted.
  The last challenge is very open ended for the purpose of distinguishing yourself from other contestants.

The final challenge scores from judges are averaged for each contestant, then added to the point count
associated with challenges 1 to 14 to determine winners.