Congratulations on your decision to participate in the Part 2 journey.
The purpose of this challenge is for you to learn how to use the the ISPF Editor. Explanation of how to use the ISPF Editor is followed by screen shots at the bottom of these instructions.
From the ISPF Primary Option Menu, enter the following:tso p2
Messages about data set allocations will be displayed followed by a MAXCC=0000 notification that members were copied into the new Part 2 data sets
Enter =3.4 to jump to the ISPF Data Set
Type your ID in the Dsname Level field.
Press Enter and more data set names appear in the list that previously contained only Part 1 data set names.
New data set names include JCL, SOURCE, STATUS, P2.OUTPUT, and LOAD.
Observe a data set named, Z99999.P2.OUTPUT in the list of data set
Z99999.P2.OUTPUT will eventually contain all Part 2 challenge output.
Z99999.P2.OUTPUT will frequently be referred to as P2.OUTPUT in the instructions.
Enter e to the left of P2.OUTPUT.
Enter select #01 on the command line to create and edit member #01.
Think of a single word or brief phrase that comes to your mind when someone says "mainframe".
Tab to the first blank line, "type" the word or phrase, then "enter".
Observe a line number appeared on the left and the remaining blank lines disappeared.
Place the cursor directly on the line number.
On the left side of the line number containing your word or phrase, type 'a' to specify the preferred placement as after this line.
Place the cursor in the editor primary command input area at the top.
Enter copy 'zos.public.country'
Success from the above action is a list of countries copied into #01 after the line with your word or phrase.
The next edit action is to keep only the line with your country.
Therefore, delete all of the lines except for the line with your country.
Please be sure to leave the first line with your selected word or phrase.
#01 will only have 2 lines when complete.
How do you complete this action? - Use 1 of the following 3, or a combination of the 3:
Observe the a on the first line number to copy after the first line.
Observe the f to find your country.
Observe the dd on the first line that is NOT needed
Observe the dd on the line just above the found country.
The second dd completes the block of lines to be deleted.
Observe the d99 on line just below the found country to delete the remaining 99 lines (which is all the remaining lines.
Only the two lines you selected should be visible.
F3 to save #01 changes, end, and return to P2.OUTPUT PDS directory
F3 returns to ISPF data set list panel.
First challenge of Part 2 is complete.
That was easy and the next several challenges are intended to be
both easy and educational in preparation for more advanced challenges
that assume knowledge gained in these early challenges.
While many interact indirectly and unknowingly with mainframes each day,
few can say they interacted directly and knowingly with a mainframe today.
Learning the ISPF editor is needed to complete challenges.
Due to the editing of text being so important, this challenge is dedicated to the ISPF
You may notice that some of the following content is repeated information. However, as you will be using the ISPF editor very frequently throughout the remaining challenges, the repetition is critical in order for you to feel comfortable using it.
You can "type" many commands within the edit session, then press Enter.
Pressing Enter results in the execution of all the typed primary and line commands.
The above comments are demonstrated using examples that follow.
You only need to review the examples.
No system action is required by you, only study of the examples.
The challenge that follows assume you have a basic understanding of how to use ISPF editor.
ISPF Editor examples
Press Tab key to place cursor on first data entry line. Type 1234567890,
tab to next line, and type lower case alphabet a to v, then enter
ISPF line numbers appeared on left (see below) as a result of action above.
Edit session profile
ISPF primary command profile controls behavior of edit session.
Any profile option can be changed. Observe the various options.
Primary command reset removes all the informational items about the edit session.
Result of reset follows:
Edit session scrolling
Observe the SCROLL ===> value above PAGE was changed to
Most z/OS technicians prefer CSR
Why? F1 (Help) tutorial Option 7 explains
While in tutorial for EDIT SCROLLING, Option 2 is selected.
The Scoll Amount is explained.
Enter provides even more information and F3 will return to edit session.
Edit session primary and line commands
Several commands are typed (without enter) below
Primary command - cols
Line command - i - on line number will insert 1 line
Line command - r50 - on line number will replicate that line 50 times.
Enter executes the primary and line commands with result below.
Tab and space bar was used to position cursor into blank line
I am going to win this contest! was typed
Line command d99 on line 6 will delete 99 lines that follow
Move m line 1 after a line2
Change c 'uv ' to 'uvwxyz' all occurrences
Result of move/after and change all
Move a block of lines mm to mm, after a the last line
Result of move block of lines after last line
reset and copy c line 2 after a line 6
The copy/after did not execute because reset cancelled that execution
copy c line 2 after a line 6
This time the copy/after worked
An insert i was placed in the Top of Data line area
Data entered on the newly inserted line
Copy c line 1 and overlay a block of lines oo to oo with line 1
Change c 'First' to '1st' all occurrences
Result of line commands copy/overly and primary command change all
Overlay only overlays blank spaces - see last line
Line command to shift right a block of lines ))4 to )) by 4 spaces
Result of shift right a block of lines by 4 spaces
The above examples scratch the surface of the ISPF Editor capabilities.
Successful completion of the challenge will create member #02 in P2.OUTPUT
The challenge will explore hexadecimal, EBCDIC, and ASCII using the ISPF Editor.
Edit e Z99999.P2.OUTPUT and follow the instructions below to complete this challenge.
Enter the following to create a new member in P2.OUTPUT partitioned data set.
While in edit on the new #02 member, enter
z/OS can store and process ASCII, eventhough the z/OS default is EBCDIC.
Enter primary command hex on
Click URL below and scroll forward to review the translation table
which is needed to complete the challenge.
ASCII or EBCDIC Translation Table.
Enter primary command hex off
Enter line command hx on any line number
to display the hexadecimal values for just that line.
Enter hx again to toggle hex values off for that line.
Two modifications to the #02 member are required to successfully complete the challenge
While the above modifications can be accomplished several ways -
What is available in ISPF Editor to accomplish the task?
Make sure you press F3 or enter save on the command line to save your changes.
Congratulations! You are done with this challenge and may move on to the next one.
Moving forward in the contest, remember the ISPF Editor Summary in References drop down
and F1 to view ISPF Edit tutorial for additional assistance.
All operating systems execute programs and enable program access to resources such as data on disk.
z/OS uses Job Control Language, (JCL), to:
JCL is a stream of statements where:
JOB, EXEC, and DD relationship -
z/OS environment has "readers" to process JCL statements
During the contest, challenges will only submit JCL, not start any JCL.
Submit JCL, review JCL job output, identify and correct a JCL error.
From ISPF command line, enter
tso submit jcl(jobs)
View JCL job output using another panel interface - (SDSF) - System Display and Search Facility
From ISPF command line, enter
From SDSF command line, enter
From SDSF command line, enter
where z99999 must be replaced with your ID
From SDSF command line, enter
The following "SDSF STATUS DISPLAY ALL CLASSES" panel is displayed as a result of the above commands
Tab to the NP column and type s to the left of JOB1, JOB2, JOB3 to select the output of each JOB, then press enter. F3 to proceed to next selected job.
Below JOB1 JCL JOB output listing includes ENDED - RC = 0000
RC = 0000, is Return Code 0000, indicating JOB success.
Below JOB2 output also reads ENDED - RC = 0000
Observe JOB2 has 2 STEPNAMEs (STEP1 and STEP2)
- A STEPNAME is associated with each EXEC statement following a JOB statement
Observe JOB1 has 1 STEPNAME (STEP1)
Reason: JOB2 executed 2 programs (EXEC PGM=) and JOB 1 executed only 1 program.
Below JOB3 output includes JOB NOT RUN - JCL ERROR
JOB3 output has details about the JCL ERROR
STMT NO. MESSAGE indicates y and s are unidentifiable characters on the DD statement
The output includes a number to the left of each JCL statement
Observe MESSAGE was about STMT NO. 9
How? - Use the ISPF Editor to correct the JCL error
Repeat the above process until successful execution of JOB3
Duplicate JOBNAMEs are listed as a result of submitting the JCL JOB stream repeatedly
Typically, the highest JobID number is the latest
Unwanted JOBNAMEs can be purged by entering p to the left of the unwanted JCL JOB
Challenge #3 is complete once JOB3 successfully completes.
Successful completion of JOB3 will write #03 member into P2.OUTPUT.
Like ISPF, SDSF has a help tutorial, (F1)
The "SDSF STATUS DISPLAY" "NP" column
NP is abbreviation for non-protected which means commands can be entered in the NP column
z/OS has a clever mechanism for a program to use different physical data sources without changing the program.
That mechanism is Job Control Language, JCL. Understanding JCL is required to claim average knowledge of z/OS.
Job Control is the best description of JCL. Therefore, think Job Control when learning about the syntax of JCL.
The previous challenge submitted JCL for processing and introduced JCL terminology and syntax.
Challenge #4 will:
To elaborate on JCL terminology, consider a PAYROLL program and a CASH program
where the programs open several filenames to read, process, and write.
open filenames employee, payrate, taxrate as input
open filenames paystub, totcash as output
read filenames employee, payrate, taxrate
process payroll program logic
write filenames paystub, totcash
open filenames totcash, cashbefr as input
open filenames cashaftr as output
read filenames totcash, cashbefr
process cash program logic
write filename cashaftr
Observe the JCL below has JCL ddnames with same name as program filenames above
What is a JCL ddname?
What is a JCL step?
Description of a few DD parameters describing the data input/output resources
Additional information will be presented about JCL features and functions in later challenges.
For now, let's start with a challenge based upon the background information.
Outline of challenge activity:
The problem is a matter of failure to open a program filename.
The program filename fails to find the corresponding JCL ddname.
Once the problem is corrected, program execution writes messages to P2.OUTPUT(#04)
1. Edit source data set
2. Select member name, cblrdwr, in the source data set
Optional: to hilite COBOL reserved words, enter hilite cobol
4. Submit JCL to compile COBOL program source code, jump to SDSF, and proceed to SDSF status panel
submit; =sd; st
5. Submit JCL to execute program CBLRDWR
tso submit jcl(job04)
6. Locate messages in output describing why COBOL execution failed
7. Identify and correct problem
Once problem is identified, correct the problem in JCL JOB04 and verify correction by
Successful execution of JCL JOB04 writes P2.OUTPUT(#04)
The solution is very simple and proves an understanding of the relationship between a z/OS program and JCL.
A starting point to understand Data Set Names, Types, and Attributes, is a review of what was learned in previous challenges.
What are the data set name rules?
> Maximum of 44 characters in length
> The 44 characters are divided into segment names
> A period ( . ) is used to separate data set name segments
-- Z99999.SEQ.DATA has 3 segment names
> The period ( . ) counts toward the 44 character length
The data set name segment has rules and restrictions
-- Maximum length of a segment is 8 characters
-- 1st character must be alphabetic (A to Z) or national (# @ $)
-- Remaining 7 characters are either alphabetic, numeric (0-9), national, or hypen (-)
-- Name segments are separated by a period ( . )
To summarize, data set names must not exceed 44 characters, including all name segments and periods.
Instructions will reference the following abbreviations associated with data set names:
What are the common data set types?
> PDS - Partitioned Data Set
> PDS/E - Partitioned Data Set/Extended
> VSAM - Virtual Storage Access Method
-- VSAM is subdivided into 4 types
o KSDS, Key Sequenced Data Set
o ESDS, Entry-Sequenced Data Set
o RSDS, Relative Record Data Set
o LDS, Linear Data Set
What are the common data set attributes?
> Record Length
--z/OS is record oriented - not a stream of bytes like other operating systems
JCL parameter (LRECL=length_value)
> Record Format
o data set record lengths are all equal length
o JCL parameter (RECFM=F)
o data set record lengths vary between records
o JCL parameter (RECFM=V)
-- Fixed Blocked
o a group or block of fixed length records
o JCL parameter (RECFM=FB)
-- Variable Blocked
o a group or block of variable length records
o JCL parameter (RECFM=VB)
o understood by system loader of executable modules
o JCL parameter (RECFM=U)
> Data Set Organization
-- Physical Sequential
o A sequential data set
o JCL parameter (DSORG=PS)
-- Partitioned Organization
o Partitioned Data Set with directory of members
o JCL parameter (DSORG=PO)
-- Partitioned Organization/Extended
o Partitioned Data Set with directory of members, faster and more efficient
o JCL parameter (DSORG=PO,DSNTYPE=LIBRARY)
-- Virtual Storage Access Method (VSAM)
o 4 unique organization types, (DSORG=VS)
o System utility program (IDCAMS) control statements define VSAM types and attributes
Other data set types exist but will not be covered in the challenges.
Other data set attributes include disposition (new, old, etc.), disk volume and disk storage space which will be explored in challenge #6.
In preparation for the challenge - review your existing data set name types and attributes
ISPF Data Set List Utility panel =3.4 and view Data Sets Matching your HLQ:
Two methods exist to view data set types and attributes from ISPF panels
1. Continue to press F11 and view columns associated with each data set name
2. In the command column to the left of any data set name, enter either s or i
Options s and i show slightly different details
The instructions are brief by design.
Rely upon the above background, knowledge, and ISPF navigation experience that you have acquired from past challenges.
Description of challenge
1. A JCL JOB will allocate 4 new data set names, each with different types and attributes
2. You will be instructed to change a single attribute of each data set name.
Submit JCL JOB to allocate the 4 new data set names
tso submit jcl(job05)
Enter refresh on the DSLIST panel to view new data set names
a. All 4 of the data set names need the record format to include the blocked attribute.
b. Upon completion of the changes - sub ; =sd; st and review JOB05 output for RC = 00
c. If JOB05 completed with RC = 00, then =3.4 and review data set name attributes
When satisfied that each of the data set names with MLQ of CH5 include a record format that is blocked, then -
delete the MLQ of CH5
edit JOB05 and uncomment the last JCL statement as follows:
Submitting JOB05 with execution of JCL procedure CH5DEL will:
1. Allocate the 4 data sets with blocked attribute record format
2. CH5DEL write the 4 data set name attributes and types to P2.OUTPUT(#05)
3. CH5DEL deletes the 4 data set names
Reminder: Delete the 4 MLQ CH5 data sets before running JOB05
If curious about JCL procedure CH5DEL, then view 'VENDOR.PROCLIB(CH5DEL).
Feel free to check your P2.OUTPUT(#05) written by CH5DEL , then move on to the next challenge!
In the event an original copy of JOB05 is needed, during edit session -
Delete all the statements - d999 on line number 1
Copy in original JOB05 - copy 'zos.public.jcl(job05)'
Next: Challenge #06
A starting point to explore Virtual Storage Access Method (VSAM) is a review of what was included in the previous challenge.> VSAM - Virtual Storage Access Method
VSAM has capabilities for speed and data organization flexibility beyond non-VSAM data set types.
You will learn more about these VSAM capabilities in later challenges.
Review the following wikipedia explanation: Wikipedia - Virtual storage access method.
IDCAMS has numerous functions. Only DEFINE CLUSTER and DELETE CLUSTER control statement will be used in this challenge.
A CLUSTER name references 1 or more VSAM data set name components.
An example is the Key-Sequenced Data Set (KSDS) which has a CLUSTER name associated with a:
1. VSAM CLUSTER INDEX data set name component and
2. VSAM CLUSTER DATA data set name component.
The challenge below follows the same pattern as the previous challenge with these exceptions:
1. VSAM data set names instead of non-VSAM data set names
2. Viewing VSAM CLUSTER attributes is accomplished differently
Again, the instructions are brief by design, relying upon your rapidly increasing experience.
The challenge JCL is using relatively new features only available in the latest version of z/OS.
The challenge is an opportunity to see something that very experienced z/OS technicians have yet to discover.
Specifically, JCL in-stream control statements may contain system symbolics to be substituted prior to execution.
Observe DD *,SYMBOLS=CNVTSYS, then &SYSUID. will be substituted with your ID.
Description of challenge
1. A JCL JOB will allocate 4 new VSAM CLUSTERs, each with different types and attributes
2. You will be instructed to change VSAM CLUSTER attributes
Submit JCL JOB to allocate 4 new VSAM CLUSTER names.
tso submit jcl(job06)
a. The KSDS, ESDS, and RRDS need the recordsize to be an average length of 100 and a maximum length of 1024.
b. Upon completion of the changes - sub ; =sd; st and review JOB06 output for RC = 00
c. If JOB06 completed with RC = 00, then =3.4 and review CLUSTER name attributes using listc ent(/) all
When satisfied that the KSDS, ESDS, and RRDS CLUSTER names with MLQ of CH6 each include
a recordsize average length of 100 and a maximum length of 1024, then -
Edit e JCL(JOB06) and uncomment the last JCL statement as follows:
If curious about JCL procedure C6DEL, then review JOB06 output.
Feel free to check your P2.OUTPUT(#06) written by C6DEL , then move on to the next challenge!
In the event an original copy of JOB06 is needed, during edit session -
Delete all the statements - d999 on line number 1
Copy in original JOB06 - copy 'zos.public.jcl(job06)'
As mentioned in previous challanges:
Another important character encoding scheme is Packed Decimal.
Storing numbers in Packed Decimal format improves application performance for arithmetic processing.
Applications must convert EBCDIC numbers into either packed or zoned decimal to perform arithmetic functions.
Therefore, if the numbers are stored in packed or zoned decimal, then application cycles are reduced.
Outline of tasks in this challenge:
A Character Encoding Summary is available to complete the challenge. Browse this document before you begin.
References drop down includes Character Encoding Summary.
Edit member DATACODE in Z99999.PDS.DATA
Observe some characters look funny and "Data contains invalid (non-display) characters"
Enter the following on the primary command line:
reset ; source ascii
The ==MSG> will be supressed and ASCII translation will be applied to all characters in DATACODE
Observe below many of the non-displayed characters are displayed. The
previous displayed characters are not displayed.
The reason for all the @ characters is because an EBCDIC space is an ASCII @ character. The hexadecimal value is x'40'. When x'40' is displayed as EBCDIC, a blank space is displayed. When x'40' is displayed as ASCII, @ is displayed.
Enter the following on the primary command line:
The display will return to default EBCDIC translation as shown below
Observe below translation is back to default EBCDIC
Enter the following line command as shown below on the first line
The first line number will show Hexadecimal representation of each character on the line
Observe the first line is all EBCDIC spaces, x'40'
It is possible to overtype the Hexadecimal values
Overtype the first 4 Hexadecimal values, 40404040 with 81826162 as shown below, then press enter
Line 1 now displays ab followed by 2 strange characters
Enter the following as shown below
cols; source ascii
to display a column ruler and translate Hexadecimal to ASCII
Observe line 1, column 1-4.
Columns 3 and 4 have ab and columns 1 and 2 are strange.
Therefore, while z/OS default Hexadecimal translation is EBCDIC, z/OS can display ASCII
Enter cancel to return to PDS directory without saving changes
From the PDS directory command line enter the following:
a2e is a REXX routine that was quickly written to:
1. Read DATACODE lines
2. Translate Packed Decimal and ASCII to EBCDIC and write the line only when the following is true:
a. Valid Packed Decimal sign found in last "nibble" of column 4
b. Valid Packed Decimal number found in columns 1, 2, 3, 4, and last "nibble" of column 4
c. Valid ASCII space character, x'20', found in any column between column 5 and 80
Note: a2e, (a)scii (2) (e)bcdic
Edit DATACODE and change the last line (9) as follows:
1. change +432 in columns 1-4 to Packed Decimal format
2. change the characters in columns 5-80 to ASCII
While in ascii mode, what you type will be ascii, but that x'C4' in column 12 will require special handling
5-57 reads - Packed Decimal is superior for arithmetic performance
58-80 are spaces that need to be changed from EBCDIC to ASCII - F11 to see columns 72-80
F3 to save changes, then
can be used to validate your line 9 Packed Decimal and ASCII changes
No @ characters should be on the line 9 characters displayed on the screen
Once the changes are complete, then edit DATACODE member and type the following:
and enter the following line command on line 000001
F3 to exit edit session.
You just completed the challenge and demonstrated above average skills with hexadecimal, EBCDIC, and ASCII.
In the event original copy of DATACODE is needed
Edit member DATACODE in Z99999.PDS.DATA
D999 on line number 1
The result of completing this challenge is a single number.
The answer requires locating, interpreting, and summing 9 separate numbers to arrive at the single number.
The 9 numbers are located in 3 separate data sources:
--- where ##### is the last five digits of your personal ID
--- note - z is lowercase in the unix file names
The 9 numbers are in 3 separate encoding formats:
1. Packed Decimal - (remember this can be a positive or negative number)
The 9 numbers are in specific record numbers, starting in specific column positions within the record.
Each number has a length of 4 bytes
Terminology byte, nibble, and bit are explained at bottom of Character Encoding Summary
Challenge instructions below provide:
1. Data source
2. Record number in data source
3. Column position within the record number
Please reference link below for encoding formats
Character Encoding Summary
Encoding formats must be identified, then the corresponding decimal values are summed to arrive at the final number.
ISPF View ( v ) provides all the capabilities of ISPF Edit ( e )
ISPF View disables ability to save any accidental changes
Use ISPF View ( v ) on the data set name or unix file name to locate data fields and interpret encoding format
Note: If you need to start over, submit the above JCL again because the JOB08 to record answer deletes the data sets and unix files needed for this challenge
The massive amount of data controlled by IBM mainframes is critical data.
If you have a bank account, your money is more than likely controlled by an IBM mainframe. When you check your bank balance from a Smart Phone, the transaction most likely runs on a mainframe to return your bank balance to the Smart Phone. Your travel reservations, flight, hotel, and rental car, are most likely stored on mainframe controlled disk storage. These examples are just scratching the surface of the critical data controlled by mainframes.
Large Enterprises and governments are entrusted as caretakers of critical data that the general population and the economy depend upon. These caretakers of critical data have jobs of high responsibility and experience.
Recent terminology describing critical data is Data Gravity. As the exponentially growing stream of non-critical data is the vast majority of data flowing at any moment, data gravity is a phrase being used to differentiate the most important and critical data (data with heavy density) from the non-critical and disposable data such as a tweet.
Enough of the high level stuff. Back to the basics of data in a z/OS environment.
Completing challenge #09 will not be difficult. However, the challenge is designed to introduce elementary details about z/OS data management.
Previous challenge review:
Challenge #09 explores another data set attribute - space
While the space attribute limits the total amount of disk storage that a data set can consume, flexibility does exist.
System assignment of disk storage space include:
1. Primary extent size
2. Secondary extent size
3. Disk device size-allocation-unit applied to the primary and secondary extents
c. block length
d. others exist
TRK is the "size-allocation-unit" that happens to be 56,664 bytes on z/OS controlled disk devices
5 is the primary extent - in this case the primary extent size is 56,664 x 5 = 283,320 bytes
1 is the secondary extent - in this case the secondary size is 56,664 bytes
Space allocation flexibility:
Only 1 primary extent allocation per data set name
The 1st secondary extent allocation only occurs when the primary extent is full
Additional secondary extent allocations only occur when previous secondary extent is full
The total number of secondary extent allocations depend upon data set type - ranging from 15 to 255
References drop down Data Set and Disk Storage Capacity has a table of maximum secondary extents by data set type
An extent is a contiguous area of disk space with an absolute starting location on the disk device and an absolute ending location on that same disk device.
A free extent is a contiguous area of disk space with an absolute starting location on the disk device and an absolute ending location on that same disk device that is available for any new primary and secondary extent allocation sizes that will fit.
A few simple diagrams to visualize z/OS disk space allocation follow:
A large enterprise has thousands of disk devices, each with a unique disk device address
The disk storage administrator or systems programmer use a system utility to initialize disk volumes,
allocating a label and a VTOC, Volume Table of Content.
The label points to the disk location of the VTOC.
The VTOC has starting and ending location of every extent (primary, secondary, and free extents.
A newly initiatize disk volume would have 1 free extent capable of holding a single primary extent allocation. Typically, a disk volume contains many primary and secondary extents.
When a primary extent is allocated, the VTOC is updated with:
1. data set name
2. starting location of the data set name primary extent (p1)
3. ending location of the data set name primary extent (p1)
4. starting location of free space (f1)
5. ending location of free space (f1)
When a primary extent is full and secondary extent allocated, then VTOC is updated with:
1. starting location of the data set name secondary extent
2. ending location of the data set name secondary extent
3. starting location of free space extent
4. ending location of free space extent
The challenge is an opportunity to view space allocation by allocating primary and secondary space.
The challenge repeatedly writes into the data set name until reaching the maximum number of secondary extents for the specific data set type.
Successful completion of challenge #09 is to modify data set name space allocation secondary extent value from 1 track to 2 tracksSubmit JCL to allocate new data set name and copy data into the new data set name:
The P2.OUTPUT(#09) shows numtrks are 1 for the primary and all secondary extents
Edit JCL(JOB09) and change only secondary space extent from 1 to 2 for the hlq.EXTENT.TEST data set name
sub, then review the "Data Set Information" and observe value of "Secondary tracks"
Again -Submit JCL to add more records to hlq.EXTENT.TEST
Press enter a few times until you see notification the job completed.Review the "Data Set Information" for number of "Used extents"
Note: View requires F11 (shift right) to display content of the numtrks column. Browse b will display content of the numtrks column without need to shift right.
If P2.OUTPUT(#09) shows numtrks primary extent value of 1 and secondary extent values of 2,
then the challenge is complete.
Understanding data set types and attributes are core to advancing your knowledge about z/OS data and disk space management
Congratulations! You know more about z/OS than the average person
If you want to read more about the disk technology storing this "massive" amount of critical data:
Physical direct access storage used by z/OS today is provided on hardware such as the IBM DS8880 "includes informative short video" that can scale from 3 terabytes to more than 3 petabytes of physical storage capacity. A single mainframe connects to many physical hardware storage controllers which could potentially scale to more than 3 petabytes. Thus, a single mainframe is capable of processing an enormous amount of data.
Completion of challenge #10 means you will have knowledge about z/OS that many z/OS technicians eventually understand after decades of using z/OS. However, a few highly experienced technicians must understand these details thoroughly. The z/OS technicians that understand these details in challenge #10 are typically the best z/OS technicians in a large enterprise.
The previous challenge described how a data set name is stored and located on a specific disk volume.
Large enterprise z/OS environments have many thousands of disk volumes.
How does z/OS locate a data set name among many thousands of disk
Challenge #10 will answer the above question with an explanation, then challenge your understanding of the explanation.
The simple answer is a CATALOG which is a list of entries
consisting of Data Set Name / Volume Label pairs.
When a data set name is allocated on a disk volume, z/OS updates a "catalog" inserting an entry with the data set name / volume label pair.
Request to access an existing data set name starts with search of the "catalog"
z/OS can manage many thousands of disk volume labels and millions of
data set names.
Are all these cataloged data set name / volume label pairs in one place?
"No". While possible to put all the pairs in one catalog data set,this is a bad idea for many reasons.
Where are these data set name / volume label pairs stored?
z/OS has a Master Catalog (MCAT) which is a VSAM data set type.
A z/OS system has one and only one MCAT
The MCAT could store millions of data set name / volume
But the "best practice" is to only store critical operating system data set name / volume label pairs in the MCAT
The business data set name / volume label pairs are stored in User Catalogs (UCAT)s
z/OS has many UCATs.
Each UCAT is defined by the storage administrator or systems programmer.
So, how does z/OS know which UCAT has the requested data
set name / volume label pair?
That question is the key to understanding the z/OS catalog structure.
All searches for data set names start with the MCAT.
MCAT has other entry types:
1. ALIAS name entry
2. User Catalog name entry
The ALIAS name is effectively the HLQ that represent a
collection of data set names.
Each ALIAS name entry is "related" to a UCAT name
Each UCAT name entry can have many ALIAS names "related" to it.
Therefore, the MCAT consists of many ALIAS / UCAT name pairs.
A contest system example would be Z99999.JCL
- HLQ is Z99999 - An ALIAS name of Z99999 was defined to the MCAT, "related" to a UCAT name
Note: Z99999 here refers to the actual userid Z99999, not to your personal userid.
The command below defined an ALIAS / UCAT pair entry in the MCAT
- define alias(name('z99999') relate('catalog.useraa'))
A future request for data set name 'Z99999.JCL' will:
1. Search the MCAT
2. Find Z99999 ALIAS name related to UCAT 'CATALOG.USERAA'
3. Forward the search to UCAT 'CATALOG.USERAA'
4. Find Z99999.JCL and associated volume label - data set name / volume label pair
5. Forward the search to the volume label where VTOC resides
A few commands to visualize the above explanation -
From ISPF command shell panel =6, enter the following:
Now you are ready for a challenge to demonstrate knowledge about z/OS catalog structure.
Successful completion is coding 2 LISTC commands as instructed.Review the LISTCAT command syntax.
Edit e hlq.JCL(JOB10)
JOB10 includes 1 LISTC command with no operands.
Modify LISTC command adding operands that will:
1. List all the Master Catalog data set attributes such as VSAM type, MAXLRECL, VOLUME, etc.
Submit and review JOB10 output - sub ; =sd; st
Edit hlq.JCL(JOB10) and replicate (r) the LISTC command line creating a 2nd LISTC line.
Modify the 2nd LISTC command to include operands that will:
2. List **only the User Catalogs known by the Master Catalog.
Submit and review JOB10 output - sub ; =sd; st
The number of lines in the correct JOB10 SYSPRINT DDNAME output is less than 250 lines.
Observe Rec-Cnt column in the SDSF status panel for number of lines in output.
Once satisfied with output of JOB10 execution, then Edit hlq.JCL(JOB10) and change as follows:
1. Comment or delete JCL statement SYSPRINT DD that writes output to JES spool SYSOUT=*
2. Uncomment JCL statement SYSPRINT DD that writes output to &&TMP
3. Uncomment JCL statement EXEC TRUNC80
If the job run was successful, then P2.OUTPUT(#10) will contain requested information.
The #10 output is truncated to 80 columns and that is expected.
Now you know more than the average z/OS technician.
Feel free to move on to the next challenge now.
The previous challenge explained how newly allocated data set names
As a result, only the data set name is required for z/OS to locate the requested data set name among the thousands of disk volumes storing data set names.
Unix file names are excluded from the Master Catalog and User Catalogs.
However, the z/OS Catalog structure can locate the Unix file system directory containing Unix file names.
How are Unix file names located?
The simpliest answer is that Unix file names are located the exact same way that Unix file names are located in any Unix.
IBM AIX is a Unix derivative.
Review the link below from an AIX manual that provides explanation with visuals describing Unix directory structure
Unix Directory Structure
How are z/OS Unix file systems, such as ( /z ) directory, stored on a z/OS controlled disk volume?
The following are available to view and edit Unix file names. Feel free to optionally try these various methods to view and edit Unix file names.From ISPF session
What is available to list all z/OS mounted Unix file systems on the contest system?From z/OS Unix shell command prompt - either TSO OMVS or SSH session
The above links are external references / help commands, rather that commands to be executed as part of the challengeFrom ISPF =UF
Successful completion is to code Unix command to write requested report about /z filesystem to hlq.P2.OUTPUT(#11)
While Unix commands can be entered from a Unix shell prompt (stdin) with output written to the display (stdout), it is possible to execute Unix commands using JCL where STDIN, STDOUT, and STDERR are DDNAMEs directing output to to either a Unix file name or a data set name.
Change all lowercase z##### to lowercase your_id in the JCL, then submit
JOB11 JCL executes a system utility, BPXBATCH, which initiates a Unix process. COND CODE 0001 is harmless, if observed in the output.Description of JOB11 JCL
The stack of Unix shell echo commands followed by the ls command writes text lines to the STDOUT DD physical resource
which is currently /z/z#####/mounts file name
The df command has an operand that will create a report with the following format:
Note: When using the interactive Unix shell prompt, df | more command syntax will pause df command output until enter key which will proceed allowing you to see column labels and first entries in the df outputChange JCL JOB11 as follows:
Successful completion writes the requested report to hlq.P2.OUTPUT(#11)
Now you have even more z/OS experience with techniques using a combination of JCL and Unix file systems.
Large Enterprise IT organizations are divided into specific roles with distinctive responsibilities.
An interesting aspect about these technology roles and responsibilites is that the skills can be applied to a wide variety of industries.
The previous challenges are core z/OS skills that prepared you for challenges related to these specific roles. The best place to start a journey of mastering a large enterprise IT organization is the operations and production analyst area. This is where everything comes together and has the broadest view of the technology, roles, and responsibilities.
Successful completion of this challenge has data in hlq.P2.OUTPUT(#12).
z/OS operation staff must be familiar with operating system commands for immediate problem analysis related to reported problems.
Output from the commands below will contain answers to questions that the systems programmer will ask you, the lead operator.
Use the SDSF console facility, then open a user log to conveniently look back through command output previously entered.=sd ; ulog
Navigating the system log uses syntax that is available when reading a data set using
ISPF such as
Enter the following commands as if you are the lead operator just looking around the z/OS environment for anything abnormal. Don't worry if you enter a command incorrectly. It will not affect the ability to complete the challenge 100% correctly. Just enter the proper command again.
Entering ulog again will show all command output in our personal user log.z/OS Display commands and descriptions
Enter the following to immediately engage with the on-call systems programmer which simulates a cell phone text message facility:tso zhelp
Read each question and enter to proceed to next question. The output from the commands previously entered include the answers to the questions. Review the ULOG or SYSLOG to find the answer to each question and enter tso zhelp providing answers. You may enter tso zhelp as many times as needed. Each new execution of zhelp replaces previous zhelp answers.
Answers are written to hlq.P2.OUTPUT(#12). View hlq.P2.OUTPUT(#12) to validate your answers
Attention MAC workstation contestants:
If hlq.P2.OUTPUT(#12) lines appear blank, then enter right of F11 and scan for numbers.
If the 3 numbers are on the far right side of the line, all is ok, F3. Score routine will find the numbers.
If the lines are totally blank, then enter answer to question #1 on line 1, answer to question #2 on line, and answer to question #3 on line 3 .
Enter the following to begin this challenge -
tso submit jcl(job13a)
Automation of operational procedures can be accomplished with software products or available commands accompanied by a small bit of programming.
Large Enterprise computing operations are highly automated. While the environment runs on autopilot, if a problem occurs beyond the scope of automated operations, then the technical staff must quickly react to identify and resolve the problem.
A large computing environment infrastructure is constantly changing as a result of upgrades to hardware, software, network, and business applications. Automated procedures require adjustments to accommodate those changes. Changes to the environment can result in a problem automation is unable to handle requiring operations or systems technical staff to identify and resolve the problem.
Therefore, like a fireman or an aircraft pilot, an operator should spend time reviewing the automated procedures. The more the operator learns about the underlying technology, the better equipped the operator is to manage unexpected problems or even find an opportunity to contribute additional automation.
Automation related to security is receiving significant attention as a result of web enablement of critical systems and data that was not previously available to the general public. When someone or something is continously looking for open doors to access critical data that does not belong to them, then action is needed. A couple of decades ago, those doors to the critical data did not exist. Even when the doors are closed, those doors may not be sufficiently locked. The issue is data must pass between the highly fortified back end systems and the general public. While authentication, encryption, and other fortifying technology is applied, the criminally minded are constantly probing for weaknesses to exploit.
Some highly secure computer systems are without network connectivity or the network is only able to read while updates are not possible or the network is only able to send updates while read of existing updates is not possible. Many large enterprise IBM mainframe environments must enable both reading and writing to serve the general public. The IBM mainframe has achieved the highest level of security for such an environment. If you are curious about computing security levels, internet search for "Common Criteria", "Evaluation Assurance Level, EAL", "Multi-Level Security, MLS", or "Trusted Operating System". IBM z Systems hardware running z/OS has achieved EAL 5+ rating which is the best rating achieved by a publicly accessible general purpose computing environment. An example of a computer system rated EAL 6 is where the operator of the computing system is a military pilot flying the most advanced aircraft.
While IBM z Systems running z/OS has EAL 5+ capabilities, requirement to implement and maintain security best practices is required by the organization.
Many IBM z Systems z/OS environments are tightly locked down which only enables designated users to access only what they are explicitly permitted to access. The result is the inability to learn about and explore z/OS capabilities to develop z/OS skills. Your participation in the Master the Mainframe contest provides access to capabilities unavailable to many internal technical staff members within a large enterprise operation.
Operations technical staff are trusted staff members. Operations technical staff will have access to capabilities necessary for their job responsibilities that are not available to application development and other Information Technology staff. Operations is a great place to gain the big picture of the organization.
You are a trusted member of the operations staff. Security and systems programming staff collaborated about the potential need for additional firewall rules based upon suspected unauthorized external probing of the system. You are instructed to collect data when a specific symptom occurs to provide the security and systems programming staff with immediate facts about the environment that may potentially prove or disprove technical staff theory that would assist with effective firewall adjustments.
Do the following because as a trusted operator you are asked to:
Note: MVS command /d tcpip,,netstat,stats produces the same output as tso netstat stats.
The operational symptoms described by security and systems programming staff are occurring several times a day resulting in the repeated labor intensive task to collect requested data. Operations staff decided to automate the above procedure. However, the automated procedure has a syntax error that must be corrected to work.
You previously submitted JCL(JOB13A) which accomplished 1, 2, and 3 outlined in the above challenge scenario. JCL(JOB13A) wrote output from first execution of commands into hlq.CH13.OUTPUT(RUN1).
JCL(JOB13B) writes output from second execution of commands into hlq.CH13.OUTPUT(RUN2). A REXX routine reports the differences in values of interest to security and systems progamming staff.
The REXX routine does work properly. If you care to view the REXX routine,
browse 'b' ZOS.MTM2017.PUBLIC.CLIST(CH13).
Big hint: The REXX routine assumes correct command syntax producing command output. Review hlq.CH13.OUTPUT(RUN2) after submitting JOB13B for more useful problem symptoms.
Enter the following -
tso submit jcl(job13b)
Use SDSF to review JOB13B output. Use ? to the left of JOB13B and select s DDNAME SYSTSPRT with associated StepName REPORT.
Observe SYSTSPRT output fails to have values for the second execution of the commands. Example, variable 'R2.4KHCOM.POOL' is in the report where the value for 4khcom pool should be. The REXX routine uses variable R2.4KCOM.POOL to store and report the value. Other REXX routine variables begin with R2.. If the output contains literals that begin with R2., then something is still incorrect. REXX routine is NOT the problem. The REXX routine is reading hlq.CH13.OUTPUT(RUN2) and the content in RUN2 is incorrect as a result of an error in JOB13B.
JCL(JOB13B) is creating hlq.CH13.OUTPUT(RUN2). Therefore, a correction to JCL(JOB13B) will produce a good report.
Once a good report is produced, then write the report to
hlq.P2.OUTPUT(#13) as follows:
Successful completion will be a valid report in hlq.P2.OUTPUT(#13)
Try an internet search using words z/OS Production Control Analysts. You will find jobs using terminology from the previous challenges. Large Enterprise IT organizations use Job Scheduling Software to control thousands of JCL jobs with complex processing dependencies. The skill set of a Production Control Analyst includes analysis of JCL job dependencies. A responsibility of the Production Control Analyst is to identify and resolve issues related to scheduled JCL jobs.
An analogy to JCL job scheduling dependencies is a manufacturing assembly line where cars proceed through a series of assembly stations. Each station completes a task, such as installing the front windshield. If the windshield installation station fails, the assembly line stops until the windshield installation station problem is resolved. Obviously, immediate attention is directed to the windshield installation station due to business impact that can be costly.
You can think of z/OS Production Control and Job Scheduling as an assembly line where the product passing through the assembly process is critical business data.
JES2 is a z/OS component that reads and prepares JCL for processing by z/OS. A brand new Job Scheduling feature is available in the latest z/OS level used in this contest.
This is an opportunity for you to learn some specific z/OS technology and terminology many professional z/OS Production Control Analysts have not had the opportunity to learn.
The new feature is JES2 Execution Control, JEC.
If you interview for a z/OS Production Control Analyst position and the employer
asks, "Are you familiar with XYZ Production Control Job Scheduling software?"
You can respond, "No, however, I do have experience with JES2 Execution Control which is the principle behind the more sophisticated Production Job Scheduling software packages."
That response would be impressive, demonstrate your technology flexibilty, and potentially prompt them to ask, "What is JES2 Execution Control?", giving you the opportunity explain your value to them.
A JEC statement stream is a special type of JCL statement stream that creates a job group. A job group includes related job names with assigned attributes that determime when execution should begin for each job name.
What value is the new JEC capability in an IT organization that has Job Scheduling Software?
As previously mentioned, z/OS technology skills can be applied to a wide variety of businesses.
For the purpose of this challenge, let's assume a business that orders massive volumes of food products, then distributes packaged food products to bakeries, restaurants, donut shops, etc. The specific business application involves bulk ordering of flours, sugars, and oils, then distributed in packed smaller bulk amounts to client bakeries, restaurants, donut shops, etc.
The fictitious company name is "FSOC, Flours, Sugars, Oils Company"
A daily set of JCL jobs are scheduled and processed that are critical to the business.
Clients place orders for flour, sugar, and oil throughout the day as input to the following schedule of JCL jobs:
J####?? where ?? represents a JCL job name suffix for:
The challenge will focus on JEC statements used to control job name dependency processing of the above jobs.
Enter the following:
The above changed all occurrences of #### to the last 4 digits of your ID in hlq.JCL(JOB14A) and hlq.JCL(JOB14B)
Enter the following:
tso submit 'zos.public.jcl(fsoc)'
The above copied data sets and executable modules required for this challenge.
The following data sets were created as application program inputs and outputs:
Several executable modules were copied to hlq.LOAD
Observe the following:
Submit the JCL JEC statements and review the status of the job group as follows:
Enter the following while viewing hlq.JCL(JOB14A):
submit ; =sd ; jg
help or F1
Note: In the event of system message, "In data Z#####.JCL", then help or F1 again
3 to select Action Characters
D, Display Information in the log.
You can add:
E - Jobs in the group that encountered an error
J - Jobs associated with the group
L - Information about the group, long form
N - Network
P - Dependencies for the group
Enter to go forward in the Action Characters help panel and observe:
JP Dependencies for the group (access the JP panel).
Try the various actions above on the Job Group JG panel Action Characters against your job group, G####. You will need to F3 to exit from action command output and return to JOB GROUP DISPLAY panel to enter next action character command.
The next step of the challenge is to submit the JCL jobs, then enter these same commands to observe the differences
Note: Next action involves JCL JOB14B - NOT JOB14A
The JCL job names identified in the JOB GROUP DISPLAY need to be submitted - which follows:
Observe the following:
From SDSF ST panel enter a to the left of J####00 as follows to 'release' the job:
Following completion of J####00, then the other job names with dependencies will run
Note: It may take a minute or so for the order of the jobs and the Queue to match the above display.
Check the Job Group from SDSF as follows:=sd ; jg
Select s G#### and observe the messages in the JOBGROUP log to determine which jobname ended with ABEND=U4038
According to the dependency diagram above in the instructions, what job name should run last? A correction is needed in JOB14A JEC statement stream to avoid the abend
If the JOBGROUP has a program abend, then:
If the JOBGROUP log reads that all jobs completed successfully, then:
Another panel appears and enter the following to write the G#### JOBGROUP log to hlq.P2.OUTPUT(#14)
You'll find the output from this challenge is stored in P2.OUTPUT(#14). Well done! You are quickly reaching the end of part two!
You use computer programs many times a day. Each time you use your cell phone or access the internet, you are executing computer programs. The vast majority of the time you pay for something, computer programs are being executed. 92% of money is digital, meaning the money is controlled by computers. Only 8% of money is physical coins and paper.
Computer programs are computer instructions and programming languages are used to create the computer programs. Understanding computer programming languages is a fundamental skill in today's highly digitized world. Experienced computer programmers know after learning the first computer programming language, it is increasingly easy to learn and use other computer programming languages.
One programming language was designed specifically for business, COBOL, COmmon Business-Oriented Language. COBOL is one of the early programming languages. COBOL programming language continually improved over decades as did the business logic written in COBOL. COBOL code is processing some of the worlds most critical data every day. COBOL was tailor made for processing critical back-end data. The benefit of knowing this programming language is the ability to understand the critical day to day business logic implemented by employees probably long retired from a company.
During the past few decades, several major programming languages emerged with the internet, such as Java, Java Script, C/C++, Python, etc. These programming languages and the internet are tailor made for each other just as COBOL was tailor made for processing back-end critical data. Newer programming languages, such as SWIFT and GO, continue to emerge with the emergence of internet devices and blockchain.
Each of these programming languages are important in the technology area they best serve. A highly experienced application developer will take the time to thoroughly understand the critical back-end programs to write highly efficient front-end programs. Quite often, a minor change to back-end programs can make front-end programs much simpler to write and maintain while being significantly more efficient. An example would be a mobile phone program that communicates with a mainframe program to check a bank balance where the front-end mobile phone is written in Java Script or SWIFT and the back-end mainframe program is written in COBOL.
COBOL programming language is an excellent starting place to learn how to create computer programs.
The contest system will use the latest release of COBOL. Enterprise COBOL for z/OS, V6.1 continues the IBM commitment to COBOL on z/OS. Companies gain the benefit of new investment combined with more than 50 years of IBM experience in compiler development. This allows new code and recompiles of existing code to exploit hardware efficiencies introduced with state-of-the-art mainframes.
This challenge uses COBOL programming language to demonstrate fundamental programming skills. All programming languages can accomplish the same computer instructions using different syntax. If all programming languages can accomplish the same computer instructions just using different syntax, then why so many different programming languages? If you are interested in an answer to the question, then please read a brief explanation posted in stackoverflow below:
The challenge is to correct an existing COBOL syntax problem, then enhance the same COBOL program.
In Part 3, some of the challenges include COBOL. The Part 3 challenges will assume
knowledge of challenge preparation below.
The following will prepare you to accomplish the challenge.
So, if you do not review this now and you decide to tackle Part 3, then remember this is here to review later as needed.
To accomplish the above challenge preparation, you will be given explicit instructions to follow and you will be directed to a different web site to read an explanation.
Review information about COBOL program structure at URL below
Thanks to University of Limerick for an excellent description
Scroll forward in the link below - start reading at COBOL coding rules
COBOL Program Structure from University of Limerick
Review information about COBOL basic syntax at URL below
COBOL Basic Syntax
Review information about COBOL data types at URL below
COBOL Data Types
Review information about COBOL basic verbs at URL below
COBOL Basic Verbs
Review information about COBOL File Control at URL below
COBOL File Organization
Review information about COBOL File Handling Verbs at URL below
COBOL File Handing Verbs
You will now repeatedly execute program CBL6 to help you understand the above explanationFrom ISPF Command Shell panel =6, enter the following:
Review information about COBOL iteration and transfer control processing at:
COBOL PERFORM explanation from University of Limerick
Congratulations! If you stepped through the challenge preparation, then you can claim to know COBOL. You can signup for a COBOL class at your University and get a very good grade. COBOL is skill that can be an attention getter on a resume to help secure an interview with a large enterprise where the core business logic is COBOL.
Below are the COBOL professional manuals used by large enterprise application developers
COBOL program language source code, CBL15, is available to:
The following actions are needed to complete the last Part 2 challenge:
Hint: Only 1 line in CBL15 requires 2 changes to successfully execute program
Successful execution of CBL15 writes the total of all read numbers into hlq.P2.OUTPUT(#15)
You just completed Part 2. Time to check your work.