Data Set Space and Disk Storage Extents
Part Two - Challenge #09

Background:

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:

  • z/OS default character encoding is EBCDIC. However, ASCII can be stored and processed.
  • z/OS is a record-oriented operating system where records have defined lengths
      Conversely, in a stream of bytes oriented operating system, the text data streams require "newline" or "carriage return" characters in the data stream.
  • z/OS stores records in a variety of data set types
    Sequential, PDS, PDS/E
    VSAM (KSDS, ESDS, RRDS, LDS)
    Unix file system
        - which are VSAM Linear Data Sets formatted for Unix filesystems
        - more about that in Part 3 of the contest.
  • Data set attributes include:
    Record Length
    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 #09 explores another data set attribute - space

  • Other operating systems allocate files as if disk storage capacity is unlimited
      This continues until the disk storage capacity is full
      Manual action is required to free up disk storage space to continue
  • z/OS allocates files (i.e. Data Sets) with a defined disk storage capacity limit
      Data Sets are allocated using a space attribute

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
  a. Cylinders
  b. Tracks
  c. block length
  d. others exist

Example:
SPACE=(TRK,(5,1))
  where -
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 and label.
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

Over time, the VTOC is updated with numerous:
1. data set names
2. starting location of the data set name extents
3. ending location of the data set name extents
4. starting location of free space extents
5. ending location of free space extents

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.

A previous challenge introduced the acronym HLQ, High Level Qualifier - the 1st segment of a data set name
your_id in the form of Z##### is your hlq
  Moving forward in the written instructions, substitute your_id for hlq

Challenge:

Successful completion of challenge #09 is to modify data set name space allocation secondary extent value from 1 track to 2 tracks

Submit JCL to allocate new data set name and copy data into the new data set name:
tso submit jcl(job09)

JOB09 allocated a data set name hlq.EXTENT.TEST

Display hlq.EXTENT.TEST "Data Set Information" ( i ) from data set list panel ( =3.4 ) and review:
  • Current Allocation
      Allocated tracks
      Allocated extents
  • Current Utilization
      Used tracks
      Used extents
Submit JCL to add more records to hlq.EXTENT.TEST
tso submit 'zos.public.jcl(job09b)'

The number of records added by JOB09B will result in more secondary extents
  Review the "Data Set Information" for number of "Used extents"

Submit JCL JOB09B again to add even more records to hlq.EXTENT.TEST
tso submit 'zos.public.jcl(job09b)'

The additional number of records added by JOB09B will result in more secondary extents
  However, JOB09B returns SB37, out of space condition during this 2nd execution
  Review the "Data Set Information" for number of "Used extents"

Submit JCL to write VTOC information about hlq.EXTENT.TEST into hlq.P2.OUTPUT(#09)
tso submit 'zos.public.jcl(job09c)'

View hlq.P2.OUTPUT(#09) and observe:
  • Ext seq
  • Begin-End
    Cyl-hd   Cyl-hd
  • Reltrk, numtrks

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
tso submit 'zos.public.jcl(job09b)'

The number of records added by JOB09B will result in more secondary extents

Press enter a few times until you see notification the job completed.

  Review the "Data Set Information" for number of "Used extents"

Submit JCL JOB09B again to add even more records to hlq.EXTENT.TEST
tso submit 'zos.public.jcl(job09b)'

The additional number of records added by JOB09B will result in more secondary extents
Submit JCL to write VTOC information about hlq.EXTENT.TEST into hlq.P2.OUTPUT(#09)
tso submit 'zos.public.jcl(job09c)'

View hlq.P2.OUTPUT(#09) and observe:
  • Ext seq
  • Begin-End
    Cyl-hd   Cyl-hd
  • Reltrk, numtrks
  • 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

Next: Challenge #10

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.