実践編(08.MVS Data Set Names, Stored Data, and Attributes)

★厳選オススメ記事!

  • 予備知識

z/OSはデータの格納とアクセスするための多種多様な技術があります。
Due to the long history of technology advancements without deprecation of earlier technology insured investment protection and upward compatibility.
言い換えれば、新しいバージョンのオペレーティングシステムは、以前のバージョンのオペレーティングシステムで正常に実行されたアプリケーションとデータ格納技術をサポートする必要があります。オリジナルのデータ格納技術は廃止されたことはありません。しかし、長年にわたってデータの格納と検索のための新しい手法は追加されてきました。世界中で最も重要なデータはz/OSデータ・セットに格納されています。z/OSの経験を主張するためには、これら基本的なストレージ・タイプの違いに関する知識を蓄える必要があります。 

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

これらのタイプのデータセットで実行するいくつかの基本的なアクションは次のとおりです。
・ISPFを使用して異なるデータ・セット・タイプを表示する。
・JCLを使用して、異なるデータ・セット・タイプ間でデータをコピーします。
EBCDIC、ASCII、およびPacked Decimalデータ形式に関する知識。
・JCLを使用して順次データ・セットと区分データ・セット(非VSAM)を割り振ります。
・JCLを使用したVSAMデータ・セットの定義。
・JCLを使用して非VSAMおよびVSAMデータ・セットにデータを書き込む。

このチャレンジの際に役立つ参考資料がいくつかあります:
MVS Data Set Name Rules
EBCDIC, ASCII, and HEX Reference Conversion Table
Packed Decimal Format

・実践

Open your CC#####.JCL and locate the following members. These are required to complete this challenge successfully:
・DSNAMES
・SEQ2SEQ
・SEQ2PDS
・SEQ2PDSE
・SEQ2VSAM

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:

Data Encoding Stored 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.
TSO SUBMIT JCL(DSNAMES) 

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 

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!

広告を非表示にする