MVS Data Set Names, Stored Data, and Attributes
Part Two - Challenge #08


z/OS has a massive variety of techniques for storing and accessing data. Due to the long history of technology advancements without deprecation of earlier technology insured investment protection and upward compatibility. In other words, every new version of the operating system should support applications and data storage techniques that successfully ran on previous versions of the operating system. Original data storage techniques were never deprecated; however, newer techniques to store and retrieve data were added over the years.

The most critical data in the world is stored in z/OS data sets and in order for you to claim z/OS experience, you must include knowledge of the difference between these fundamental storage types:

  • sequential data set (SEQ)
  • partitioned data set (PDS)
  • partitioned data set extended (PDS/E)
  • virtual storage access method data set (VSAM)

Some fundamental actions that one would perform with these types of data sets are:

  • Viewing different data set types using ISPF.
  • Copy data between different data set types using JCL.
  • Knowledge of EBCDIC, ASCII, and Packed Decimal data formats.
  • Allocating sequential data sets and partitioned data sets (non-VSAM) using JCL.
  • Defining VSAM data sets using JCL.
  • Writing data into non-VSAM and VSAM data sets using JCL.

Here are some references that will come in handy during this challenge:

Your challenge:

Open your CC#####.JCL and locate the following members. These are required to complete this challenge successfully:


Packed Decimal is commonly used for storing numbers used in arithmetic processing. Packed Decimal arithmetic operations improves computer performance.

As you saw in an earlier challenge, EBCDIC and ASCII are encoded differently. Now you can add a third encoding format for decimal values. Here's a side by side comparison of the different formats:

DataEncodingStored Value
abcde EBCDIC x'8182838485'
abcde ASCII x'6162636465'
25873 EBCDIC x'F2F5F8F7F3'
25873 ASCII x'3235383733'
25873 Packed Decimal x'25873C'

Note the right most hexadecimal digit in packed decimal is always one of three values. "C" indicates positive, "D" indicates negative, and "F" indicates unsigned. Also, it doesn't make sense for there to be a packed decimal representation of "abcde" because packed decimal is used solely for numeric data.

At this time, open CC#####.JCL(DSNAMES) and read the following description of the programs and data definitions:

  • IEFBR14 is a system utility that is useful for allocating sequential and partitioned data sets.
  • A DD statement exists for each of the three data set types. Take a close look at the DD operands to determine the data set name, type, attributes and space allocation.
  • IDCAMS is a system utility program used to define VSAM data sets.
  • DEFINE is the IDCAMS control statement to determine the data set name, attributes, and space allocation.
Submit the DSNAME JCL now.

DSNAMES will create multiple data sets for you. Use SDSF to view the DSNAMES job output and determine what the names of the newly created data sets are. There are new data sets for each type in SEQ, PDS, PDS/E, and VSAM. You will need the names of these data sets to execute the remaining JCL in this challenge. Here is some information that will help you identify the relevant parts from the DSNAMES output:

  • Sequential
    Sequential data set organization is referred to as Physical Sequential (PS) and allocated in JCL with the DD operand "DSORG=PS".
  • Partitioned
    Partitioned data sets organization is referred to as Partitioned Organization (PO), allocated using JCL DD operand "DSORG=PO".
    Partioned Organization Extended (PO-E) is allocated using JCL DD operand "DSORG=PO" with "DSNTYPE=LIBRARY".
Note: Both PO and PO-E are commonly referred to as 'libraries', implying that they contain data of a similar type. However, the JCL DD operand "DSNTYPE=LIBRARY" is used exclusively for allocating PDS/E (PO-E) data sets.
  • VSAM, Virtual Storage Access Method
    VSAM organized data sets have performance benefits over sequential and partitioned data sets. DB2 tablespaces are stored in a VSAM organization where DB2 itself formats and manages the storage. Unix file systems are also stored in VSAM data sets and Unix formats and manages the internal storage.

VSAM is defined using the system utility IDCAMS. IDCAMS can define, delete, and rename VSAM data sets. It can also import and export data using the "REPRO" control statement and print data using the "PRINT" control statement.

At this time, open CC#####.JCL(SEQ2SEQ) for editing. This JCL copies some "in-stream" data in the SORTIN DD into a sequential data set. Note on line 4, we've left the DSN= parameter incomplete. You will need to type in the sequential data set name that was created by the DSNAMES job. Once you have done this, submit the job. Review the job execution in SDSF and take note of the data set referenced by the SORTIN DD statement. Then use =3.4 to open and view the contents of this data set.

Next, edit CC#####.JCL(SEQ2PDS). This job copies the contents of a sequential data set into a partitioned data set. Using the same sequential data set that was just copied into by SEQ2SEQ, amend line 4. Then submit the job and review the output. Ensure the job has ran successfully before continuing.

Edit CC#####.JCL(SEQ2PDSE). This JCL will copy the aforementioned sequential data set to the PDSE that was created by DSNAMES. Amend line 4 as needed, submit the job, and review it's output in SDSF. Continue once the job has ran successfully.

Edit CC#####.JCL(SEQ2VSAM). This JCL copies the same sequential data set into the VSAM data set that was created by DSNAMES. Again make your amendment to line 4, and take note here -- line 5 has an incomplete DSN as well. This needs to be set to the VSAM data set from DSNAMES. Once ready, submit the job and review the output in SDSF. Once satisifed, continue on with this challenge.

The ISPF editor is not able to view or edit VSAM data due to his complex data structure. However, there exists another interactive utility named File Manager (FM) that provides this capability. Use the ISPF primary command =F followed by option 2 to open the File Manager Edit Entry Panel.

Enter the fully qualified name for your DSNAMES created VSAM data set in the "Data set/path name" field, enclosed with single quotation marks. Just like the ISPF editor, the FM editor also has the ability to display hexadecimal values. Enter the primary commands HEX ON and HEX OFF to toggle hexadecimal character representation display.

The data inside the VSAM data set should be identical to the data found in the sequential data set.

From inside the FM editor on line 1, type in C99, then enter the primary command REPLACE '/z/cc#####/charset'. Make sure that cc##### is all lowercase. Set the Owner attribute to 6, Group to 0, and Other to 0, then press enter. Observe the message "Data set replaced" in the top-right corner.

Press F3 a few times to return to the ISPF Primary Option Menu, then jump to =3.4. Just like in part one, type in the full path to your USS home directory (/z/cc#####). Recall that your ID in your USS path is all lowercase.
Tab down to the line command area next to the filename "charset" and open it for viewing. Confirm that the contents matches the other data sets in this challenge, then press F3 to return to the z/OS UNIX Directory List.

Again, next to the "charset" filename, enter the line command C to open the Copy From z/OS Unix File dialog. In the To Name field, type in P2.OUTPUT(#08) and press enter.

Review the P2.OUTPUT(#08) member and confirm that it contains the same data as has been passed around repeatedly in this challenge. If all is well, you may move on to the next challenge!

Next: Challenge #09