Getting Started
Part Two - Challenge #01

Background:

Congratulations on your decision to participate in the Part 2 journey.

Click twisty to view Reminder
Contest ID in the instructions:
  All references to Z##### are examples.
  Substitute your assigned ID in all cases.

You will learn about z/OS TSO, Time Sharing Option

The challenge objective is familiarity with TSO, Time Sharing Option.

  • TN3270 LOGON results in a session with TSO.
  • TSO is a command line interface, CLI, without full screen support.
  • Password is required on the TSO LOGON screen.
  • The contest system is customized to automatically start ISPF, a panel driven interface with full screen support. Therefore, you do not see the TSO Ready prompt during LOGON process.
  • The TSO logon screen was customized with LOGOFF in the Command field.
     LOGOFF in the Command field bypasses the TSO Ready prompt.

Challenge:

Access TSO Ready prompt, then complete TSO tasks as instructed

Logon to z/OS as you learned in Part 1, then pause after typing your password and read the following:

Observe
Command ===> logoff
in the TSO/E LOGON display.

The result is execution of TSO logoff upon termination of ISPF session.
Tab to logoff and use space bar to remove logoff, then enter to proceed to ISPF Primary Option Menu.
From ISPF Primary Option Menu, enter x to terminate the ISPF session.

The following display may or may not appear.

If the following screen appears, then enter 2 to Delete data set without printing.

The Log Data Set contains activity from session which is no longer needed.


Actions to complete challenge #01

Termination of ISPF session should now result in the TSO READY prompt.

The following text lines are for copy and paste convenience to help complete the challenge quickly:
    time
    submit 'zos.public.jcl(part2)'
    a
    allocate dataset(p2.output(#01)) file(sysut2) shr
    allocate dataset('zos.mtm2018.public.pds.data(country)') file(sysut1) shr
    allocate dummy file(sysin) reuse shr
    iebgener
    logon z#####

Below is only a description of the actions you will take in the screen shot following this description.

  1. Enter time command to verify READY prompt environment
  2. Submit a JCL job entering submit 'zos.public.jcl(part2)'
  3. Enter a in response to ENTER JOBNAME CHARACTER(S) -
      press enter a few times until MAXCC=0000 is displayed
  4. Allocate your P2.OUTPUT partitioned data set member name #01 assigning a file name SYSUT2
  5. Allocate ZOS.MTM2018.PUBLIC.PDS.DATA partitioned data set member name COUNTRY
      assigning a file name SYSUT1
  6. Allocate DUMMY to system input
      assigning a file name SYSIN
  7. Enter IEBGENER to execute the system generate utility
     where program IEBGENER reads from file name SYSUT1 and writes the content to file name SYSUT2
  8. Enter logon z##### to re-logon to the TSO/ISPF environment
      where z##### must be substituted with your personal ID

Enter TSO commands shown in screen shots below to complete the challenge - remember you have the text above for copy and paste convenience.

The previous action to LOGON from the READY prompt restarted the TSO session.

After typing your password, tab to Command ===> input field and enter logoff in the command field of the TSO/E LOGON panel to save time exiting from the TSO/ISPF session in the future.

While many interact indirectly and unknowingly with mainframes each day, few can say they interacted directly and knowingly with a mainframe today.
You can!

Next: Challenge #02

ISPF, Interactive System Productivity Facility
Part Two - Challenge #02

Background:

You will learn how to use ISPF

Familiarity with ISPF is needed to complete challenge #02.

ISPF is used frequently throughout the contest to complete challenges.


Useful Information About ISPF and help you complete the challenge

A short video is available to explain ISPF.

Click on the following URL, then select Lecture 7 video which is less than 8 minutes.
z/OS Introduction

Note: If "Start Chat" appears, decline. Chat is for clients considering a purchase.


Challenge:

To complete challenge #02

Lecture 7 video explains the basics of ISPF necessary to complete the following challenge.

  1. Enter your ID in the Dsname Level field on the ISPF Data Set List Utility (3.4) panel.
     All data set names that begin with your ID are displayed.
  2. Enter print on the command line once the data set names beginning with your ID are displayed.
    Physical screen printed appears in the upper right corner.
  3. Enter =x to terminate ISPF.
     Observe Specify Disposition of List Data Set panel appears.
     Observe List Data Set (Z#####.SPF#.LIST) Disposition:
     Take note of the SPF# where # will be an assigned number between 1 and 9
  4. Enter 4 in the Process Option field.
     A data set name beginning with your ID and ending with SPF#.LIST was created and kept
     where # is a number from 1 to 9.
  5. Logon to TSO ISPF environment.
  6. Enter dslist 'z#####' - remember to substitute your ID for z#####.
     Command dslist 'z#####' is an alternative method to display the Data Set List Utility panel
     and all data sets beginning with 'z#####' appear.
  7. Enter co in the command column to the left of data set name ending with SPF#.LIST
    Copy Entry Panel is displayed.
  8. Type p2.output in the Name field just below To Other Data Set Name, then tab to NEW member name field and enter #02 .
     A message stating Data set attributes are inconsistent appears.
     Ignore the message and enter to perform copy action.

Successful execution of the challenge instructions created #02 in data set name P2.OUTPUT where #02 contains a screen print of data set names beginning with your ID.

Congratulations! You are done with challenge #02 and you ready for the next challenge.

Next: Challenge #03


ISPF Editor
Part Two - Challenge #03

Background:

You will learn how to use ISPF Editor

Familiarity with ISPF Editor is needed to complete challenge #03.

ISPF Editor is used frequently throughout the contest to complete challenges.


Useful Information About ISPF Editor and help you complete the challenge

A short video is available to explain ISPF.

Click on the following URL, then select Lecture 8 video which is less than 8 minutes.
z/OS Introduction

Note: If "Start Chat" appears, decline.
Chat is for clients considering a purchase of additional IBM Z technology features.

While in ISPF Edit session, enter help or press function key 1, F1, to display online ISPF Editor tutorial help.

The contest instruction web site has an ISPF Editor Command Summary under the References drop down.
ISPF Editor Command Summary


Challenge:

To complete challenge #03

Lecture 8 video explains the basics of ISPF Editor necessary to complete the following challenge.

NOTE: During the challenge the following ISPF Edit Entry Panel appears - enter to proceed.

  1. Edit data set name ending with SPF#.LIST where # can be 1 to 9.
     Observe text of the screen print from previous challenge.
  2. Enter primary command reset to suppress the ==MSG> lines at the top.
  3. Enter primary command cols to display a column ruler.
  4. Enter primary command right 29 to shift the text right by 29 columns -
      the line text begins with column 30 in the display.
  5. Enter primary command left 29 placing column 1 back in the far left of the display.
  6. Enter line command d10 over top of line 000001 - (overtype 00001 with d10).
    d10 deletes 10 lines.
  7. Enter line command d99 over top of the line number where the text "******** End of Data Set list" appears.
    d99 deletes 99 lines which is more than all the remaining lines in the data set.
  8. Type line command ((29 over top of line 000001, then
     tab to last line number and type (( over top of the last line number, then
    enter to execute the line commands where -
    ((29 to (( shifts the range of lines 29 columns to the left.
     The shift left line operation removed text in column 1 to 29 which was mostly spaces.

Successful format of the ISPF Edit session will look like the following ISPF Edit session screen

If the format is not correct, then enter ISPF primary command cancel and start over.

If the format is correct, type primary command replace p2.output(#03)
and c99 over top of line 000001, then enter to copy all lines to member #03 in data set p2.output .

NOTE: A truncation message appears. Truncation is ok. Enter to proceed.

Member #03 created message appears in the upper right area of the display.

The above created member #03 in data set name P2.OUTPUT
where #03 contains an edited screen print of data set names beginning with your ID.

F3 (function key 3) to save and exit from the ISPF editor session.

What you learned about the ISPF editor:

  • Line commands are typed over top of line numbers to the far left of the line text.
  • Primary commands are typed in the edit session Command ===> field.
  • Line commands can be executed against a single line or a block of lines.
  • A combination of line and primary commands can be typed into the edit session,
     then the line and primary commands are executed upon depressing enter.
  • While in ISPF edit session, F1 (function key 1) displays the ISPF editor help tutorial.
  • Remember you have access to an ISPF editor summary reference -
    ISPF Editor Command Summary

The ISPF editor is feature rich, flexible, and powerful.

Professionals continue to learn ISPF editor tricks and techiques for many years after their first exposure to ISPF editor.

It is only possible to become proficient with ISPF editor as a result of repeated use and exploration.


The ISPF Editor is used frequently in the contest.

Congratulations! You are done with challenge #03 and you ready for the next challenge.

Next: Challenge #04


SDSF, System Display and Search Facility
Part Two - Challenge #04

Background:

You will learn how to view JCL JOB output using SDSF

Familiarity with SDSF is needed to complete challenge #04.

SDSF is used frequently throughout the contest to complete challenges.

In challenge #04 SDSF is used to:
  1. submit JCL for execution
  2. view the JCL JOB output
  3. write a selected part of the JCL JOB output to member #04 in P2.OUTPUT
You will learn more about SDSF capabilities in later challenges, such as:
  1. viewing the system log
  2. processing system commands

Useful Information About SDSF and help you complete the challenge

A short video is available to explain SDSF.

Click on the following URL, then select Lecture 9 video which is less than 8 minutes.
z/OS Introduction

Note: If "Start Chat"appears, decline.
Chat is for clients considering purchase of more IBM Z technology features.


Challenge:

View JCL JOB output in SDSF

Lecture 9 video explains the basics of SDSF necessary to complete the challenge.

From ISPF Primary Option Menu, enter sd to access SDSF panels

Commands are available in SDSF to limit view to only input, execution, and output owned by your ID.

  1. owner z#####
      Remember to substitute your ID
      Instructs SDSF to limit view to what your ID owns
  2. prefix *
      Instructs SDSF to view everything owned by your ID
      Alternatively, a prefix z* would view only items beginning with z owned by your ID
  3. st
      Instructs SDSF to provide status of entries based upon owner and prefix values
  4. ;
      A semicolon is a command separator
      All commands separated by ; in the command stream are executed.

Enter the SDSF command string as seen below.

The result is a status of your TSO session which is in EXECUTION Queue

Submit a JCL JOB by entering tso submit jcl(ch04jcl) in the COMMAND INPUT field as follows:

Enter b when prompted to ENTER JOBNAME CHARACTER(S) as follows:

A message SUBMITTED, and another message indicating the JCL JOB completed successfully with MAXCC=0000 are displayed - enter to see them, then finally you are returned to SDSF status display.

Tab to the left of the completed JCL JOBNAME ending with B .

Enter s to select all the JCL JOBNAME output.

Note: It might be necessary to refresh the display with an extra enter for JCL JOBNAME to appear.

All the JCL JOBNAME is selected and you could page forward to view all the output.

However, viewing all the JCL JOBNAME output is unnecessary.

Press function key 3 F3 or enter end to return to previous SDSF Status display.
Tab to the left of the completed JCL JOBNAME ending with B

Enter ? to view DDNAME sections of the output.
Tab to the left of DDNAME JESMSGLG.

Enter s to select JESMSGLG section of the JCL JOBNAME output.
The challenge objective to write JESMSGLG output below to your P2.OUTPUT data set name.

Press function key 3 F3 or enter end to return to previous SDSF Status display.

Actions to complete challenge #04
Tab to the left of DDNAME JESMSGLG.

Enter XDC to select JESMSGLG section of the JCL JOBNAME output to be printed.
XDC will display Open Print Data Set panel to enter target data set information.

Enter p2.output for Data set name, #04 for Member name to use, and shr for Disposition.
If a trunction message appears, truncation is ok. Enter to proceed.

The above created member #04 in data set name P2.OUTPUT
  where #04 contains only the JESMSGLG section of the JCL JOBNAME output.

Observe PRINT CLOSED in the upper right area of your screen.

Enter return to return to ISPF Primary Option Menu.

The challenge created member #04 in data set name P2.OUTPUT where #04 contains output of a JCL JOB.

SDSF was used to view the JCL JOB output and write a selected part of the output to member #04 in P2.OUTPUT


Congratulations! You are done with challenge #04 and you ready for the next challenge.

Next: Challenge #05
Job Control Language, JCL
Part Two - Challenge #05

Background:

You will learn about the input/output relationship between program execution and JCL

In challenge #04 you submitted JCL for execution and viewed the output.

In challenge #05 you will learn the basics of JCL.


Focusing on the purpose of JCL can make JCL easy to learn.
Purpose of JCL:
  • Tell the system what program to execute
  • Tell the system about the program inputs and outputs
z/OS Application Program Execution
  • A program reads, writes, and updates file names.
  • A program has internally coded file names.
  • A program is without any information about the physical data sources.

How does a program find the physical data sources to read, write, or update using the
internal file name?

The answer is JCL.

JCL Syntax
  • // starting in column 1
  • JCL is UPPERCASE
      Only exception is lowercase in quotes for unix file names, unix parameters, etc.
  • The 2 most important JCL operations are:
    EXEC
       - used to tell system what program to execute
    DD
       - used to identify program inputs and outputs

JCL DD, Data Definition, operation is used to associate a program file name with a physical data source.

Example:

PAYROLL program is coded to -
  read from file names
    employee
    payrate
    taxrate
  write to file names
    paystub
    totcash

CASH program is coded to -
  read from file names
    totcash,
    cashbefr
  write to file name
    cashaftr

JCL below has JCL DD operations with ddnames spelled exactly as the program file names from above.

What is a JCL ddname?

  • A ddname is on a DD operation where DD is JCL syntax for Data Definition
  • The program requests access to inputs and outputs using filenames
  • A program filename needs a ddname where the filename = ddname
  • DD parameters describe the input/output data source to be accessed by the program

What is a JCL step?

  • Each EXEC operation starts a new step
  • A step includes an EXEC operation followed by DD operations
  • A stepname is coded immediately after // on the EXEC operation
  • A subsequent EXEC operation is the end of the previous step and start of a new step

Description of a few DD parameters describing the data input/output resources

  • DSN=value - where value is a data set name
  • PATH=value - where value is a unix filename
  • DISP=value - where value is data set name or unix filename disposition, such as NEW, OLD, SHR, CATLG
  • *   - an asterisk(*) where what follows the DD * is in-stream data or control statements the program would recognize

----------------------------------------------------------------------------------------------
The program determines JCL the ddname.
----------------------------------------------------------------------------------------------

If a program file name does not have an associated JCL ddname, then the program execution will fail reporting no ddname found for the program file name.

JCL DD Operation Summary
  • Begins with //
  • DDNAME immediately after // on the same line
      where DDNAME must match the program coded internal file name
  • DD is after the DDNAME on the JCL line
  • Parameters used to describe input/output physical resource is after DD on the JCL line
      More about DD parameters later

Challenge:

Edit, modify, and submit JCL with correct spelling of the DDNAME needed by SORT utility program
Below describes the screen shots requiring action by you to complete the challenge
  1. Submit JCL to execute a system program utility, SORT.
  2. Review JCL JOBNAME output to identify DDNAME spelling expected by SORT.
  3. Edit, modify, and submit JCL to verify successful execution.
  4. Edit, modify, and submit JCL to write data output based upon specfic sort criteria
      where SORT program writes output to P2.OUTPUT(#05).
Enter dslist command from ISPF as follows to display Data Sets Matching Z#####.JCL
  Reminder - substitute your ID for Z#####
In the command column enter 'e' to the left of the partitioned data set name Z#####.JCL as displayed below.
A partioned data set has member names.

Enter 's' to left of member name CH05JCL.
ISPF EDIT is now able to modify member name CH05JCL in the partitioned data set Z#####.JCL.

Enter ISPF commands as displayed below to remove ==MSG> lines and hilite JCL reserved words.
Take note of line 000005 with '//DDNAME DD' syntax.

Big Hint: EXEC PGM=SORT does not expect a file name with spelling of 'DDNAME' in the SORT program.

Line 000005 DD DSN=&SYSUID..P2.OUTPUT(#05),DISP=SHR are the correct parameters describing SORT program physical resource for the sorted output.

The objective is to determine the correct DDNAME spelling.

Enter commands as seen below to submit JCL to execute the SORT program, then jump to SDSF status display.
A message that JOB SORT05 submitted is displayed.

A unique JOB number is assigned. In the example, the unique number is JOB00691.

Your unique JOB number will be different.
A message that JOB SORT05 ended with MAXCC=0016 is displayed.
The commands =sd ; st previously entered will display the SDSF STATUS panel.

Enter ' ? ' to the left of JOBNAME SORT05 with the unique JOB number from above to display sections of the JOB output.
JESMSGLG, JESJCL, and JESYSMSG are DDNAMEs generated by the system.

Program SORT expected DDNAME SYSOUT and wrote execution information in SYSOUT.

Enter ' s ' to the left of DDNAME SYSOUT to select what program SORT wrote about the execution.
The messages that begin with ICE are messages written by program SORT.

The ICE message that ends with ' A ' indicates an action is required for a successful execution.

Program SORT was looking for a specific DDNAME and wrote NOT FOUND.
  The SORT required DDNAME is on the same message line.

The JCL needs modification based upon the SORT message.

Last, use dslist command to jump to Z#####.JCL partitioned data set name.
Edit Z#####.JCL
Select member name CH05JCL
Given the hints, correct the JCL to allow SORT program to write the sorted output to data set name Z#####.P2.OUTPUT member name #05

NOTE: System variable &SYSUID. in JCL is automatically substituted with your ID.

Correct JCL, submit, and view the new SORT05 JOBNAME output for success.

The challenge created member #05 in data set name P2.OUTPUT from SORT program output produced by JCL JOBNAME SORT05.

Congratulations! You are done with challenge #05 and you ready for the next challenge.

Next: Challenge #06

JCL, Data Definition Operation
Part Two - Challenge #06

Background:

You will learn more about the JCL DD, Data Definition operation

In challenge #05 you were introduced to JCL.

You learned about the relationship between a program file name and the DDNAME.

Bottom line
A program file name must be spelled the same as the DDNAME for the system to locate the physical inputs and outputs.

In challenge #06 you are introduced to JCL DD operation parameters which are used to
describe the program inputs and outputs.


Helpful Information about JCL DD Operation

Many JCL DD parameters exist which can appear confusing. However, learning the most common parameters is pretty easy.

Most common JCL DD parameters include:

  • DSNAME=
     Data Set Name of the physical resource, typically DSN= abbreviation is coded
       z/OS has several Data Set Name types and DSN= handles all Data Set Name types
       More about the different Data Set Name types later in the contest
  • DISP=
     DISPOSITION of the DSNAME physical resource
       DISP=SHR -- resource exists and program will share access with others
       DISP=NEW -- resource is created for program output
       DISP=OLD -- resource exists and program wants exclusive access
  • PATH=
     Unix file name path of the physical resource
       Enclosed in quote marks - reason:
       Unix file names and file path are case sensitive where JCL is normally UPPERCASE
  • PATHOPTS=
    Access file options and Status file options
       More about the PATHOPTS= Access and Status file options later
  • *  (asterisk)
      What follows the asterisk ' * ' is data - NOT JCL
       The data in the JCL stream will be understood by the program
       The program is looking for the DDNAME to read followed by the data lines
       The data lines are read until the next JCL statement is found
  • SYSOUT=*
      Write the data to the system JES spool data set
       The JES spool data set is what SDSF is viewing - which you have already done.


Useful Information
You will have several SORT05 JOBNAMEs with unique JOB numbers.

From SDSF status panel, entering ' p ' to the left of any SORT05 JOBNAME will purge unwanted output.

Challenge:

Edit, modify, and submit JCL using different SORT control input
Challenge #06 uses the same JCL you used in challenge #05.

Enter dslist command from ISPF as follows to display Data Sets Matching Z#####.JCL
  Reminder - substitute your ID for Z#####
In the command column enter 'e' to the left of the partitioned data set name Z#####.JCL as displayed below.
A partioned data set has member names.

Enter 's' to left of member name CH05JCL.
ISPF EDIT is now able to modify member name CH05JCL in partitioned data set Z#####.JCL.

Enter ISPF commands as displayed below to remove ==MSG> lines and hilite JCL reserved words.
If you successfully completed challenge #05, then JCL has a modification on line 000005 .

Line 000007 is data read by SORT program.

Program SORT is looking for SYSIN DDNAME to provide sort control instructions.

The control statement instructs the program to sort the data from SORTIN starting
in column 1 for a length of 5 using character CH format and ascending A order.

Helpful Trick:
Enter bd over top of line number 000004 or 000005 to browse the data in the data set name member.

F3 will return you back to the ISPF edit session.
The challenge task:
  1. While browsing 'bd' SORTIN data, enter cols to view column numbers
      Locate column number of last name, then F3 to return to SORT05 edit session
  2. Modify SORTOUT member name from #05 to #06
    IMPORTANT: If not done, then you will replace the valid challenge #05 answer
        Rerun of challenge #05 would be necessary to correct #05
  3. Modify sort control statement using column number of last name
      Sort length, character format, and order can remain the same
  4. Submit the JCL with the modified sort control statement and review the output

You practiced what you learned in the previous challenge,
"how to submit JCL and view the JCL JOBNAME output"


Feel free to check your P2.OUTPUT(#06) written by SORT program based upon your control statement change, then move on to the next challenge!

Next: Challenge #07

Data Sets
Part Two - Challenge #07

Background:

You will learn the basics about z/OS Data Sets

Some operating systems process data as a stream of bytes or characters where a "new line" of data requires a "carriage return" character or "line feed" character embedded in the stream of characters.

z/OS manages data differently.

z/OS data is processed with an assigned record length.

z/OS "new line" occurs as the result of the assigned record length resulting in significant implications on how datasets are created, how programs process data, and contributes to why z/OS memory management is superior to other operating systems.


Useful information to understand about z/OS data sets

z/OS data sets are a collection of "records" and not a stream of bytes.
  When a z/OS program reads data, the program is reading one or more data records.
  When a z/OS program writes data, the program is writing data records.

Master the Mainframe contest objective is knowledge and experience with details of z/OS.

z/OS system technicians customize z/OS and DevOps environment to handle data set creation.

Application developers are typically unaware of details related to data set creation.
Application developers use documented procedures hiding the details required for data set creation.

DevOps tooling allows the application developers to maintain, test, and develop new business applications without the need to have any detailed knowledge about the operating system environment.

Viewing a 5 minute video is highly recommended to explain z/OS Data Set Names and Types.
 Click on the following URL, then select Lecture 11 video.
 z/OS Introduction


 Lecture 11 will help you understand details that follow required to complete challenge #07 and increase your z/OS knowledge.
  Note: If "Start Chat" appears, decline. Chat is for clients considering a purchase of additional IBM Z technology.

Common ways z/OS data sets are created include:

  • Using JCL DD parameters
  • Using ISPF panels
  • Using TSO ALLOCATE command
  • Using system utility programs
  • Using system routines and automation

z/OS needs more than a data set name to create a data set such as:

  • Record length
  • Record format
    Fixed length records or Variable length records
    Blocksize - number of records in a block
  • Data Set Organization
    Sequential - a collection of records
    Partitioned - a collection of members where the members contain records
    VSAM - Virtual Storage Access Method
       flexibility to organize records in four unique types
       designed for high speed and high volume access to data
Syntax involved in creating a data set includes:
  • LRECL - logical record length
  • RECFM - record format
  • BLKSIZE - block size
  • DSORG - data set organization
  • SPACE - disk storage size limits
    primary extent value
       - all data sets have 1 primary extent
    secondary extent value
       - numerous secondary extents are automatically created after the primary extent
         is full
  • UNIT and optionally VOL=SER=
      device type and disk volume label
  • LIKE - uses attributes of a like data set name for creating new data set

Viewing a short video is recommended to understand z/OS data set SPACE primary and secondary extents.
 Click on the following URL, then select Lecture 15 video.
 z/OS Introduction


 Lecture 15 describes z/OS disk storage details related to data set creation and management.
  Note: If "Start Chat" appears, decline. Chat is for clients considering a purchase of additional IBM Z technology.


Challenge:

Use JCL SORT to allocate an output data set with specific attributes

Challenge #07 uses SORT program to copy data from ZOS.MTM2018.PUBLIC.CLIENTS into the new Z#####.CLIENTS data set name as the result of successful execution of JCL JOBNAME CH07JCL.

NOTE: Challenge #07 instructions include screen shots to guide you to challenge completion.

Future challenges will assume you have the following basic skills without the need for screen shot examples -

  • Display your data set names using dslist or =3.4 panel
  • Edit your data set names
  • Submit JCL
  • View JCL JOBNAME output
Description of actions in the screen shots below to complete challenge:

  1. Edit Z#####.JCL member name CH07JCL
  2. Modify member name CH07JCL to create a data set name Z#####.CLIENTS with the following attributes:
      data set organization - physical sequential (PS)
      logical record length - 170
      record format - fixed block (FB)
      blocksize - 8500
      unit - SYSDA
      space in unit of tracks - TRK
      primary extent size - 1
      secondary extent size - 1
  3. Submit JCL
  4. View JCL JOBNAME for successful completion

Enter dslist jcl to list data set names the begin with your ID followed by JCL
Edit your JCL partitioned data set name
Select ' s ' member name CH07JCL
Observe the following in the JCL below

  1. JCL JOB has 3 EXEC statements
    • Each EXEC is called a JCL JOB step.
  2. Line 000003 is JCL stepname STEP1
    • Executes system utility IDCAMS to delete the data set name if the data set name exists
    • JCL feature SYMBOLS=CNVTSYS enables to system to resolve variables in the data following DD *
    • IDCAMS utility documentation describes DDNAMEs the program is expecting and purpose
  3. Line 000009 is JCL stepname STEP2
    • Executes system utility SORT to copy data into newly created data set name Z#####.CLIENTS
    • Lines 000012 to 000014 results in a single DD operation as a result of the comma's at the end of each line
    • Line 000012 DISP=(NEW,CATLG) instructs the system to create a new data set name
    • Line 000013 and 000014 includes DD parameters describing the attributes of the new data sets name
    • SORT utility documentation describes DDNAMEs the SORT program is expecting and purpose
  4. Line 000020 is JCL stepname STEP3
    • Executes system utility IKJEFT01 to list data set attributes of the newly created data set name
    • IKJEFT01 utility documentation describes DDNAMEs the program is expecting and purpose
  5. Line 00018 is a JCL condition saying execute next JCL step only if the previous step is completed successfully
  6. Line 00025 terminates the JCL condition statement on line 00018.
Enter sub ; =sd ; st to submit the JCL and jump to SDSF status panel
System message about JOB CH07JCL SUBMITTED is displayed
System message about CH07JCL ENDED with a JCL ERROR is displayed
Result of previous =sd ; st is a jump to SDSF status panel

Select ' s ' CH07JCL print output
JOB NOT RUN - JCL ERROR is in the output
Page forward entering forward command or press F8.

JCL statement 8 is the DD operation which continues on the 2 lines that follow.

When JCL errors occur, STMT NO. MESSAGE information is always at the end of the output.

STMT NO. 8 is flagged as a problem statement.
Below is a shift to the right in the output showing DSORG SUBPARAMETER OF THE DCB on line 8

JCL DD parameter DCB=(...) is used to code data set attributes as shown

Enter dslist jcl to jump to the data set list panel
Edit the JCL partitioned data set again
Select memeber name CH07JCL
  1. Edit Z#####.JCL member name CH07JCL
      The @ symbols need to be replaced with the following data set name attributes
  2. Modify member name CH07JCL to create a data set name Z#####.CLIENTS with the following attributes:
      data set organization - physical sequential (PS)
      logical record length - 170
      record format - fixed block (FB)
      blocksize - 8500
      unit - SYSDA
      space in unit of tracks - TRK
      primary extent size - 1
      secondary extent size - 1
      primary extent - 1
  3. Submit JCL
  4. Jump to SDSF and view JCL JOBNAME output for successful completion
View JCL JOBNAME DDNAMEs for successful completion

If errors persist, then edit, modify, and submit Z#####.JCL member name CH07JCL until successful completion

Actions to take to complete the challenge
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#####.P2.OUTPUT data set name
as member name #07

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

Feel free to check your P2.OUTPUT(#07) contains attributes of the new data set name Z#####.CLIENTS, then move on to the next challenge!

Next: Challenge #08

Just a Bit
Part Two - Challenge #08

Background:

You will learn about bits, bytes, hexadecimal, EBCDIC, and ASCII

There are 10 kinds of people in the world. Those who understand binary and those who don't.
If you are unfamiliar with the humor in the above statement, then you will be after this challenge.

Early school education involves decimal arithmetic and script symbols for alphanumeric and special characters.

Computer technology expertise requires an adjustment to the early school education.


Useful information about bits, bytes, hexadecimal, EBCDIC, and ASCII to help complete challenge

The digital world of computers, networks and many electronic devices operate using signals
where a signal at the lowest level is either off (0) or on (1).

The word binary involves two things. Binary, 0 or 1, is the lowest level of our digital world.
Computer instructions, alphanumeric and special characters are binary at the lowest level.

The word bit is used to store only 1 of 2 possible states. A binary bit is either state 0 or 1.
Think of a light switch with only 2 states, off (0) or on (1).

A more human friendly method to represent a defined string of bits is hexadecimal.
Hexadecimal has 16 positions (0-9 and A-F representing positions 10-15).

Two different character format schemes are

  1. EBCDIC, Extended Binary Coded Decimal Interchange Code
  2. ASCII, American Standard Code for Information Interchange
z/OS default is EBCDIC but can store and process ASCII

  • z/OS default is EBCDIC data format for character representation.
  • z/OS can store and process ASCII data format, but ASCII is not the default.
  • What is common between EBCDIC and ASCII is hexadecimal
      - Hexadecimal values are used for both EBCDIC and ASCII characters.

References drop down includes a Character Encoding Summary with Hexadecimal format
for each displayable EBCDIC and ASCII character

-- Observe the displayed lowercase a in the table as EBCDIC x'81' and ASCII x'61'
Character Encoding Summary


Challenge:

Use ISPF Editor to view and modify EBCDIC and ASCII hexadecimal values

ISPF editor has capabilities to explore hexadecimal, EBCDIC, and ASCII

  1. Edit Z#####.PDS.DATA member name MIX
      - Only lines 000001 and 000003 are readable
  2. Enter ISPF edit primary command source ascii
      - Only lines 000002, 000004, 000005, and 000006 are readable
  3. Enter ISPF edit primary command reset
      - Again, only lines 000001 and 000003 are readable
  4. Enter ISPF edit line command cols on line 000001
  5. Enter ISPF edit primary command hex on
      - Hexadecimal values for each character are visible directly below the character
      - Line 000001 - column 1 is an EBCDIC uppercase T
       - Below T on line 000001 is E and below E is 3
       - EBCDIC uppercase T is hexadecimal x'E3' where x means hexadecimal
  6. Enter ISPF edit primary command source ascii
      Line 000002 - column 1 is an ASCII uppercase T
      Below T on line 000002 is 5 and below the 5 is a 4
      ASCII uppercase T is hexadecimal x'54' where x means hexadecimal

Z#####.PDS.DATA member name MIX requires 3 modifications to successfully complete the challenge.

  1. The word binary is misspelled on line 000004 and 000005.
    Correct the spelling.
      - Correction can be accomplished any 1 of 3 ways
      1) Overtype the hexadecimal value with correct value for the misspelled letter
      2) While in source ascii mode, overtype the incorrect letter with the correct letter
      3) Primary command change can correct each occurrence of the misspelled word
  2. Decode "packed decimal" value on line 000007 located in columns 1-3
      What is "packed decimal"?
      1) See table at the bottom of Reference - Character Encoding Summary
      2) Internet research of "packed decimal" format
  3. Enter the decoded "packed decimal" value in EBCDIC format in the line 000008 text area columns 1-5 and the sign character (+ or -) in column 6

Create P2.OUTPUT(#08) from successfully modified Z#####.PDS.DATA(MIX)

  • Overtype line 000001 with c8 to copy 8 lines
  • Enter primary command replace p2.output(#08)

NOTE: ISPF primary command cancel is available to exit edit session without saving changes in the event you want to start over.


Congratulations! You are done with challenge #08 and you ready for the next challenge.

Next: Challenge #09

Data, Data Sets, and Unix files
Part Two - Challenge #09

Background:

You will learn how to allocate 7 unique z/OS data set types

You will allocate 7 unique z/OS data set types

Edit and submit JCL JOB with the following modifications:

  1. Modify DD operation DSORG parameter to allocate a sequential data set
  2. Modify DD operation DSORG parameter to allocate a partitioned data set
  3. Modify DD operation DSORG and DSNTYPE parameter to allocate a partitioned data set extended
  4. Modify IDCAMS utility program DEFINE CLUSTER control statement to allocate a VSAM KSDS cluster
  5. Modify IDCAMS utility program DEFINE CLUSTER control statement to allocate a VSAM ESDS cluster
  6. Modify IDCAMS utility program DEFINE CLUSTER control statement to allocate a VSAM RRDS cluster
  7. Modify IDCAMS utility program DEFINE CLUSTER control statement to allocate a VSAM LDS cluster

Useful Information About z/OS Data and the Variety of z/OS Data Sources:
  • z/OS disk storage space is allocated in 'extents'
      - An extent is a contiguous area on disk with an absolute starting and ending location
      - z/OS data sets have 1 primary extent
      - When the primary extent is full, then a secondary extent is automatically allocated
      - The number of secondary extents depends upon the type of data set
      - The size of a primary extent and subsequent secondary extents are determined by a SPACE attribute

    See References drop down Data Set Allocation and Disk Storage Summary

  • z/OS stores data in a variety of organization types categorized as NON-VSAM and VSAM
    NON-VSAM includes
      1) Sequential
      2) PDS, Partitioned Data Set
      3) PDS/E, Partitioned Data Set/Extended
    VSAM includes
      1) KSDS, Key Sequences Data Set
      2) ESDS, Entry Sequenced Data Set
      3) RRDS, Relative Record Data Set
      4) LDS, Linear Data Set
  • Unix file systems
      - Unix filesystem is a stream of bytes
      - Physical VSAM LDS formatted for Unix filesystem stream of byte processing
  • Databases
      DB2 is a relational database
      DB2 data is stored in a VSAM LDS, formatted, and managed by DB2
      IMS Hierarchical DB uses special access method data sources which are excluded from the contest
  • Data Set attribute syntax includes:
    LRECL, Record Length
    DSORG, Data Set Organization
        - PS Physical Sequential
        - PO Partitioned Organization
        - VS VSAM
    RECFM, Record Format
        - F Fixed Length Records
        - FB Fixed Length Blocked Records
        - V Variable Length Records
        - VB Variable Length Blocked Records
        - U Undefined Length Records

Challenge:

Information to help you find the correct parameters for successful execution of CH09JCL

Edit Z#####.JCL member name CH09JCL

NOTE: All occurrences of &SYSUID. are automatically replaced by your ID when submitted.

Change all occurrences of the @ symbols with appropriate parameters to accomplish the following:

  • &SYSUID..CH9.SEQ created as a sequential data set type
  • &SYSUID..CH9.PDS created as a partitioned data set type
  • &SYSUID..CH9.PDSE created as a partitioned data set extended type
  • &SYSUID..CH9.KSDS created as a VSAM Key Sequenced Data Set type
  • &SYSUID..CH9.ESDS created as a VSAM Entry Sequenced Data Set type
  • &SYSUID..CH9.RRDS created as a VSAM Relative Record Data Set type
  • &SYSUID..CH9.LDS created as a VSAM Linear Data Set type

Submit JCL member name CH09JCL and view the output for successful execution.

If unsuccessful, then correct and submit again.


To complete challenge #09 - create member name #09 in P2.OUTPUT with successful results
View CH09JCL output DDNAMEs

Use XDC to print content of DDNAME SYSTSPRT StepName RESULT to P2.OUTPUT member name #09 as follows:


Browse P2.OUTPUT(#09) to validate data set name allocation attributes for the 7 unique data set types are in the #09 member name.

Congratulations! You know more about z/OS than the average person

Next: Challenge #10

Copy Data Using IDCAMS System Utility
Part Two - Challenge #10

Background:

You will learn how to copy data using IDCAMS into various data set types

Edit, modify, and submit JCL JOB executing system utility program IDCAMS to copy the same input data
into 6 unique data source types:

  • Sequential
  • PDS
  • PDS/E
  • VSAM/KSDS
  • VSAM/ESDS
  • VSAM/RRDS

The input data source is data you modified in a previous challenge, Z#####.PDS.DATA member name MIX.


Useful Information About Copying Data
It is not a matter of how to copy data, it is a matter what facility you want to use to copy data.

  • ISPF panels are available to interactively copy data.
  • ISPF DSLIST column command is available to interactively copy data.
  • Unix services command ' cp ' is available to interactively copy data.
  • Many z/OS utility programs are available to copy data.
      z/OS utility programs can be executed interactively or using JCL.
      Part 1 challenge used a z/OS utility program to copy data interactively from TSO Ready prompt.
  • Writing a program in any language to copy data from a file name to a target file name,
    then execute program using JCL where DD statements are used to identify the from and to data sources.

Challenge:

Information to help you find the correct parameters for successful execution of CH10JCL

Edit Z#####.JCL member name CH10JCL

NOTE: All occurrences of &SYSUID. are automatically replaced by your ID when submitted.

Modify JCL as follows:

  • Change @@@@@ on line 000013 to an IDCAMS control statement command used to reproduce data
  • Enter ISPF edit line command, ' r5 ', to replicate line 000013 5 times creating a total of 6 lines with the IDCAMS control statement command used to reproduce data
  • Change each occurrence of OUTFILE(@@@@) to the respective JCL DDNAME found on lines 6 to 11

Submit JCL member name CH10JCL and view the output for successful execution.

If unsuccessful, then
  1) tso submit jcl(ch09jcl) to recreate empty data set names
  2) Correct JCL, submit, and view output


To complete challenge #10 - create member name #10 in P2.OUTPUT with successful results
View CH10JCL output DDNAMEs

Use XDC to print content of DDNAME SYSTSPRT StepName RESULT to P2.OUTPUT member name #10 as follows:


Browse P2.OUTPUT(#10) to validate data set name allocation attributes for the 6 unique data set types are in the #10 member name.

NOTE:
P2.OUTPUT(#10) will include REC-TOTAL--------------8 in the STATISTICS section of the VSAM data set attribute output.
  If you edit or view the VSAM cluster names, you can view the data copied.

You are ready for the next challenge!.

Next: Challenge #11

Create JCL to Delete Data Sets
Part Two - Challenge #11

Background:

You will learn how to create JCL to delete data sets

JCL is rarely written from scratch.

JCL is commonly copied, then modified to accomplish a task.

In this challenge an ISPF edit session is used to copy in JCL from a different member name,
then modified to accomplish a task as instructed.


Helpful Information About Deleting Data Sets

Common ways z/OS data sets are deleted include:

  • Using JCL DD parameter DISP=(OLD,DELETE) for NON-VSAM
  • Using ISPF panels
  • Using TSO delete command
  • Using system utility programs such as IDCAMS

Challenge:

Delete 7 unique data set types created in challenge #09
  1. Edit Z#####.JCL
  2. On the command line enter s ch11jcl to select and create a new member name, CH11JCL
    CH11JCL is empty
  3. Enter ISPF editor primary command copy ch09jcl
    CH11JCL member name now includes a copy of CH09JCL
  4. Modify JCL to delete data sets
    • Change JCL jobname from CH09JCL to CH11JCL
    • Delete JCL and control statements involved with creating the data sets
    • What should remain is 2 JCL step names, DELETE and RESULT
        Note: Modified JCL will keep the comment lines and the IF/ENDIF lines
  5. Submit modified JCL to delete the 7 data sets
      Max-RC code of 0004 is expected and normal
  6. Check CH11JCL output, specifically StepName RESULT and DDNAME SYSTSPRT, for successful deletion of 7 data sets
    • 3 ' NOT IN CATALOG ' messages for the NON-VSAM data sets
    • 4 ' LOCATE ERROR ' messages for the VSAM data sets

Actions required to complete the challenge
If SYSTSPRT DDNAME output proves the data sets were deleted,
then use XDC to print SYSTSPRT DDNAME content to P2.OUTPUT member name #11

Successful completion includes member name #11 in P2.OUTPUT with messages indicating the 7 data sets are not found.

You accomplished the challenge without example screen shots.

You demonstrated ability to use ISPF Editor, JCL, and SDSF to accomplish the challenge.

Your z/OS experience is growing. NEXT!

Next: Challenge #12

JCL & Unix Files
Part Two - Challenge #12

Background:

You will learn how to copy data to a Unix file using JCL

Many techniques are available to copy data between z/OS data sets and Unix file names.

The challenge uses JCL to execute Unix shell commands and execute a standard z/OS system utility to copy data from a partitioned data set member name to a Unix file name.


Information About Copying Data between Unix Files and z/OS Data Sets

Common ways to copy data between Unix file names and z/OS data sets:

  • Using JCL to execute standard utilities
  • Using Unix shell cp command
  • Using TSO ocopy, oput, oget, oputx, and ogetx commands
  • Using ISPF panels
  • Using ISPF editor

Challenge:

Modify and submit JCL to copy a PDS member name to a Unix file name

Important Details:

  •   Reminder - substitute your ID for Z##### and z#####
  •   Copy input is data set name Z#####.PDS.DATA member name MIX
  •   Copy output is Unix path and file name /z/z#####/mix
  •   Program IEBGENER DDNAME SYSUT1 is input
  •   Program IEBGENER DDNAME SYSUT2 is output
  •   JCL DD PATH= is used to reference Unix file name
  •   What follows PATH= must be enclosed in single quote marks
       A comma is needed after the path name to continue the DD statement
  •   The Unix file path and file name is lowercase
  •   Program BPXBATCH DDNAME STDOUT is the Unix command output
  •   JCL RESULT stepname, DDNAME STDOUT, needs to write output to &SYSUID..P2.OUTPUT(#12)
  1. Edit Z#####.JCL member name CH12JCL
    Modify JCL to copy data to a Unix file name, then execute Unix word count command,
    ' wc ' proving data was successfully copied
    • Change line 000013 where SYSUT2 is output of the data copy
    • Change line 000017 where STDOUT is output of the word count command
      proving data was successfully copied into Unix file name
  2. Submit modified JCL to copy data and verify successful copy
  3. Check output for successful copy

NOTE: The first time running CH12JCL, the DELETE step finish with a return code of 256 as a result of attempting to remove filename mix when mix filename does not exist. Return code 256 is the expected return code. All is ok.


Successful completion includes member name #12 in P2.OUTPUT with word count output

Your z/OS experience has grown another notch. NEXT!

Next: Challenge #13

Unix System Services Fun and Facts
Part Two - Challenge #13

Background:

You will learn how to use JCL for Unix shell processing, then edit a Unix file

z/OS is both flexible and open as a result of a tightly integrated Unix Systems Services component in the z/OS Base Control Program.

The challenge involves using JCL to execute Unix shell commands, reviewing the output, and then editing a Unix file created by a Unix shell command processing.


Information about the Challenge JCL JOB Used to Process Unix Shell Commands

Description of JCL JOB CH13JCL

  • PGM=BPXBATCH provides a Unix environment for shell command processing or program execution
  • STDPARM is the DDNAME BPXBATCH uses to read input
  • sh is the first control statement requesting BPXBATCH to start a Unix shell
      Alternatively, pgm can be coded to execute a Unix program instead of a Unix shell commands
  • The semicolon ' ; ' at the end of each line means the next line is new input to sh Unix shell
  • Line 17 executes Unix calendar cal command and writes ' > ' output to Unix file name sept1752
      Unix cal command writes calendar information
  • Line 23 executes Unix ls -al command and writes output to Unix standard output STDOUT DDNAME
      Unix ls -al command writes a list of file names
  • Line 29 executes Unix uname -a command and writes output to Unix standard output STDOUT DDNAME
      Unix uname -a command writes the Unix name
  • Line 35 executes Unix manual page man command
      Unix man command writes information from the Unix manual pages
      -- Unix manual page information about copy cp command is written to STDOUT
      -- The written output is passed as input to a pipe which the vertical bar ' | '
      -- Output of the pipe is input to Unix grep command
      -- grep // will output only lines containing ' // '
      -- // syntax can be used in Unix System Services cp command to reference data set names
      -- The resulting lines from man cp show syntax examples of copying data between Unix file names
        and data set names

Challenge:

Submit JCL, Review Output, and Edit Unix File
  1. View or Edit JCL(CH13JCL)
      Observe output Unix calendar cal command will be written to a Unix file name
  2. Submit JCL
  3. Review CH13JCL output for successful completion
  4. Enter tso omvs on any ISPF command line
      You are now in Unix System Services Shell prompt in your home directory
  5. Enter oedit sept1752 from the Unix shell prompt
      Observe 11 days are missing
  6. On line 8 starting in column 1, enter the year in which the "Gregorian" calendar was first introduced
      The year can found in Explanation for the 11 missing days
  7. Type ISPF editor primary command replace p2.output(#13) and c99 on line 000001, then enter to copy all lines to member #13 in data set p2.output.   Result should be output written to P2.OUTPUT(#13)
      ISPF line command c99 copies 99 lines which copies all the lines because number of lines is less than 99

NOTE: Ignore message "Data set attributes are inconsistent. Truncation may result.."
Enter to proceed past message

F3 to exit oedit session

exit to terminate unix shell session

enter to return to ISPF session


Successful completion includes member name #13 in P2.OUTPUT with September 1752 calendar followed by year the "Gregorian" calendar was introduced

You learned some trivia about the history of the calendar while learning basics of z/OS environment
NEXT!

Next: Challenge #14

DB2 SQL
Part Two - Challenge #14

Background:

Use SQL to select records from a DB2 table
The challenge demonstrates how to select rows and columns from a DB2 table,
then you will be instructed to select rows and columns from a different DB2 table.

Required Challenge Preparation - Configure DB2 ISPF Panel

Panels are available on the contest system to interactively process SQL statements.

From the ISPF Primary Option Menu, enter D2 for the DB2 Interactive functions.

The panel is used to interact with DB2 subsystem

Below - observe SSID: value is blank. Enter d to change the 'Defaults'.

Below - the DB2 Name value needs to be DBCG. Type DBCG, then enter to proceed to next panel

Below - DEFAULTS PANEL 2 is displayed.
No change is necessary.

Enter to proceed

Below - observe SSID: value is now DBCG
Your DB2 Interface panels are now ready to access the contest DB2 subsystem Enter 1 to Process SQL Statements


Required Challenge Preparation - Learn to use DB2 Interactive Panels

Examples to interactively process SQL statements follow.

From the ISPF Primary Option Menu, enter D2 for the DB2 Interactive functions.

From the DB2I PRIMARY OPTION MENU, enter 1 to Process SQL statements.

Above action results in SPUFI display below following a harmless WARNING panel that might appear.

Type pds.data(sql) in the input data set name area as shown below, then tab to output data set name area and enter sql.out as shown below

Note: when YES is present for CHANGE DEFAULTS and EDIT INPUT, then result will be interim defaults panel followed by edit session

Above action may result in a harmless WARNING panel.
Enter to proceed.

Above actions result in the interim CURRENT SPUFI DEFAULTS panel.
No change is required.
Enter to proceed.

Above actions result in an ISPF edit session.
Z#####.PDS.DATA(SQL) is initially empty.
Enter the SQL select statement as shown below.

Cut and paste text -
  select * from ibmuser.dept;

F3 to save and exit from the ISPF edit session

Enter to execute the SQL statement saved in Z#####.PDS.DATA(SQL).

Above actions result in DB2 returning the result set from the select statement.

The asterisk following the select returns all rows and all columns from ibmuser.dept where ibmuser is owner of table name dept.

Observe the table column names in the output.
The column names can be used for selective SQL output.

F3 to exit and return

Navigate your way back to the SQL processing ISPF edit session using the same input data set and output data set.

Type -- in column 1 and 2 preceding the first select statement.
The result is the first select statement is now a comment statement.

Insert a new line and enter the select statement as displayed below.

F3 to save and exit the ISPF edit session, then enter to execute the new SQL select statement.

The above action results in the output below where all rows and all columns are returned
from ibmuser.dept where the deptname = 'OPERATIONS'

Navigate your way back to the SQL processing ISPF edit session using the same input data set and output data set.

Type -- in column 1 and 2 preceding the second select statement.
The result is the first and second select statements are now comment statements.

Insert a new line and enter the select statement as displayed below.

F3 to save and exit the ISPF edit session, then enter to execute the new SQL select statement.

The result is all rows with only column deptname is returned where the admrdept column is equal to A00.

You are now ready for the simple challenge.

What you learned in Challenge 14 is needed to complete the final Part 2 challenge.


Challenge:

Edit, modify, and execute a forth SQL statment in Z#####.PDS.DATA(SQL)
  1. All previous statements in Z#####.PDS.DATA(SQL) need to be comment statements
  2. Same as previous interactive SQL executions, write the output to sql.out
  3. Insert a forth statement to return the following:
    • select all rows and all columns from table emp owned by ibmuser

Actions to complete the challenge

The SQL output is written to Z#####.SQL.OUT

  1. Edit Z#####.SQL.OUT
  2. Enter the following ISPF editor commands:
    • Type primary command rep p2.output(#14)
    • Overtype line 000001 with with line command c99, then enter

A display will appear reporting the 'data set attributes are inconsistent. Truncation may result..'

The message is expected. Press enter to proceed.


Successful completion includes member name #14 in P2.OUTPUT with output from the requested DB2 select.

You learned about interactive execution of SQL statements returning a result set from z/OS relational database tables.

NEXT! The final Part 2 Challenge

Next: Challenge #15

Number Hunt
Part Two - Challenge #15

Background:

Challenge requires the sum of 8 numbers. You must find the 8 numbers to sum.

A correct number is required to complete the challenge.

The correct number is the sum of 8 numbers from 4 separate data sources.
The 4 data sources include:

  1. Sequential Data Set Name
  2. Partitioned Data Set Member Name
  3. Unix File Name
  4. DB2 Table

Each number may be in 1 of 3 formats:

  1. EBCDIC
  2. ASCII
  3. Packed Decimal

Each non-EBCDIC number must be converted to an EBCDIC numeric value where the sum of the EBCDIC numeric values is the single number required to complete the challenge.

You will be given the name of the data sources, specific record numbers, beginning and ending column numbers within the specific record to find the number. You will NOT be given the data format such as EBCDIC, ASCII, or Packed Decimal. You will need to view the hexadecimal representation to determine when value is either ASCII or Packed Decimal.


Summary Information About the Challenge

You are prepared to complete the challenge based upon what you learned in previous Part 2 challenges.

What you learned in previous Part 2 challenge:

  • Edit, View, or Browse sequential data set names
  • Edit, View, or Browse partitioned data set member names
  • Edit, View, or Browse unix file names
      Use Data Set List Utility panel (3.4), then enter /z/z##### ....substituting your ID for z#####
      Enter 'e', 'v', or 'b' to the left of any file to edit, view, or browse the data
  • Use ISPF primary and line commands to
      - display column ruler
      - display hexadecimal values
      - move forward, backward, right, and left in data set
  • Interpret a packed decimal format
      - packed decimal number can be positive or negative
      - a negative packed decimal number requires a subtraction operation when summing the numbers
  • Use DB2 for z/OS SQL interactively to 'select' data from a DB2 table

Challenge:

Data Sources with respective Record Numbers, Column Numbers, and DB2 Table Column Names containing the 8 numbers to be summed

Character Encoding Table is available to help complete the challenge.

Enter the command below from ISPF command line to create the challenge data sources.

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

REMINDER: Substitute your ID for Z#####

Sum the 8 numbers found in the specified record and column positions from the following data sources:

  • Data Set Name Z#####.HUNT1
      #1 Record 14 Column 35 to 38
      #2 Record 18 Column 78 to 80
  • Data Set Name Z#####.HUNT2 Member Name FRED
      #3 Record 7 Column 1 to 3
      #4 Record 9 Column 47 to 49
  • Unix File Name /z/z#####/dennis
      #5 Record 6 Column 42 to 45
      #6 Record 11 Column 31 to 33
  • DB2 Table IBMUSER.EMP
      #7 Column PHONENO where lastname is YAMAMOTO
      #8 Column BONUS where lastname is YAMAMOTO

Actions to complete challenge successfully

Take the following steps to record your answer for scoring:

  1. Edit Z#####.JCL member name P2DONE
  2. Modify 0000 value located on the last line to the sum of the 8 numbers
  3. Submit JCL with the modified value

Successful complete of P2DONE writes answer to P2.OUTPUT(#15) and deletes data sources


You demonstrated the ability to locate and convert specified data fields from a variety of data formats within a variety z/OS data sources in the final challenge of Part 2.

Congratulations! You just completed Part 2. Time to check your work.

Next: Completing Part 2