z/OS DFSMSdfp Utilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 8: Print Directory of a Partitioned Data Set

z/OS DFSMSdfp Utilities
SC23-6864-00

In this example, the directory of a partitioned data set is printed according to the default format. The printed output is converted to hexadecimal.
  //PRINTDIR JOB  ...
  //STEP1    EXEC PGM=IEBPTPCH
  //SYSPRINT DD  SYSOUT=A
  //SYSUT1   DD  DSNAME=MAIN.PDS,
  //             DISP=(OLD,KEEP),DCB=(RECFM=U,BLKSIZE=256)
  //SYSUT2   DD  SYSOUT=A
  //SYSIN    DD  *
     PRINT   TYPORG=PS,TOTCONV=XE
     TITLE   ITEM=('PRINT PARTITIONED DIRECTORY OF PDS',10)
     TITLE   ITEM=('FIRST TWO BYTES SHOW NUM OF USED BYTES',10)
    LABELS   DATA=NO
  /*
The control statements are as follows:
  • SYSUT1 DD defines the input data set (the partitioned directory), which resides on a disk volume. The DCB keywords describe the directory, not the member contents.
  • SYSUT2 DD defines the output data set on the system output device (printer assumed).
  • SYSIN DD defines the control data set, which follows in the input stream.
  • PRINT begins the print operation, indicates that the partitioned directory is organized sequentially, and specifies conversion from alphanumeric to hexadecimal representation.
  • The first TITLE statement specifies a title, and the second TITLE statement specifies a subtitle. Neither title is converted to hexadecimal.
  • LABELS specifies that no user labels are printed.
Note: Not all of the bytes in a directory block need to contain data pertaining to the partitioned data set. Unused bytes are sometimes used by the operating system as temporary work areas. With conversion to hexadecimal representation, the first four characters of printed output indicate how many bytes of the 256-byte block pertain to the partitioned data set. Any unused bytes occur in the latter portion of the directory block. They are not interspersed with the used bytes.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014