CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs

DOCWEB Logo Entire document
Available as PDF

Examining PDS Directories and Members with PDSLIST


Table of Contents

Job Control Language
Command Verbs
Example
Sample Program Syntax
NOTES:

The utility PDSLIST prints the contents of a Partitioned Data Set (PDS) and/or generates a PDS directory status report. Print operations and status reports can be customized with optional keywords. The JCL in Figure 2 invokes a directory status report which lists the number of directory blocks allocated, number of blocks actually used, total main members, total number of member aliases, and the average number of entries per directory block.

Job Control Language

To generate the directory status report described above, invoke the PDSLIST cataloged procedure as in the example below. data.set.name is the name of the cataloged partitioned data set.

Figure 4. JCL for the PDSLIST Status Report.

//jobname JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE PRINT node.location 
// EXEC PDSLIST,DSN='data.set.name'

Command Verbs

Two commands verbs, LIST and PRINT, are used with PDSLIST. Minimum abbreviations are shown below in parentheses.

(L) LIST

LIST operations produce directory information.

(P) PRINT

PRINT operations print the contents of individual members or groups of members.

Optional Keywords

The following are optional keywords. When applicable, minimum abbreviations are shown in parentheses. An equal sign indicates that a dd name, data set name, option or other value must be supplied.

CUTOFF=n

specifies that only the firstn lines of each member selected by the PRINT and PREFIX options are to be printed. Useful for browsing through a program library. This keyword does not apply to the LIST option.

(DDN) DDNAME=

identifies the ddname which defines the PDS to be processed. SYSLIB is the default ddname.

(DSN) DSNAME=

identifies the name of the data set. Not necessary if the dsname is already coded in the JCL.

(O) OPTIONS=

identifies the options below chosen for current run of PDSLIST.

STATUS

indicates that the status of the data set directory is to be printed. The names of members will not be printed unless you use the PRINT command.

NAMES

indicates that member names, alias names, and TTR (member addresses) are to be listed.

ALL

indicates that SSI (System Status Indicator) and stow information are to be printed with the member and alias names.

VHEX

indicates that member contents are to be printed in both a character and vertical hexadecimal format, rather than in just character format.

(IND) INDEX=

specifies that the 1-43 character index of all data sets on the volume be processed.

(PRE) PREFIX=

specifies that the 1-8 character prefix of all members in a PDS be processed.

Example

In Figure 2, SYSLIB identifies the data set to be processed. "SYSLIB" is the default ddname. The actual ddname can be supplied by SYSIN. SYSIN identifies the control data set (optional).

Figure 5. Example of Using PDSLIST

//jobname JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE PRINT node.location
// EXEC PGM=PDSLIST 
//SYSPRINT DD SYSOUT=A 
//SYSLIB DD DSN=dsname,DISP=SHR 
//SYSIN DD * 
LIST DDNAME=ddn,DSNAME=dsn,OPTIONS=(op,op),PREFIX=pre
PRINT

Sample Program Syntax

Figure 6. Sample PDSLIST Program

//jobname JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE PRINT node.location
// EXEC PGM=PDSLIST 
//SYSPRINT DD SYSOUT=A 
//SYSLIB1 DD DSN=SYS1.USERLIB,DISP=SHR 
//SYSLIB2 DD DSN=SYS1.MACLIB,DISP=SHR 
//SYSLIB3 DD DSN=SYS1.PROCLIB,DISP=SHR 
//SYSIN DD * 
LIST DDN=SYSLIB1,OPTIONS=NAMES,PREFIX=IEE 
PRINT DDN=SYSLIB2,OPTIONS=NAMES 
PRINT DDN=SYSLIB3,OPTIONS=ALL,PREFIX=VSF

The sample program in Figure 3 will perform the following functions:

  • All member names that begin with IEE will be listed along with their addresses and alias names for the data set SYS1.USERLIB.

  • The contents of all members of SYS1.MACLIB will be printed.

  • The contents of all members whose names begin with VSF will be printed along with any directory user data fields present for those members in data set SYS1.PROCLIB.

NOTES:

  • Only RECFM F or FB card image records are supported by the PRINT command.

  • An entire disk pack can be searched for a particular member by coding both INDEX and PREFIX keywords.

  • Only columns 1-72 of the input control statements are scanned. Columns 73-80 are ignored but can be used for sequence numbering or other identification. The entire statement, however, is reproduced in the output listing.

CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs