The TSO/E REXX external function call LISTDSI (list data set information) is used to retrieve information about a data set's attributes. z/OS V2R1 introduces some enhancements to the function.
Today I'll give you some updates on the following LISTDSI enhancements:
- More information provided on multi-volume data sets
- New multivol or nomultivol keyword
- PDSE updates
- EAV updates
More information provided on muli-volume data sets
LISTDSI now provides information on all volumes of a multi-volume data set, not just the first.
The number of volumes is returned in variable SYSNUMVOLS and the list of volumes in SYSVOLUMES.
- SYSNUMVOLS The number of volumes for a multi-volume dataset.
- SYSVOLUMES List of volumes, up to SYSNUMVOLS, delimited by a space. Up to 412 characters. The first six characters will always match SYSVOLUME.
The existing SYSVOLUME returns the name of the first volume.
Here's an example:
MULTIVOL or NOMULTIVOL keyword
The new multivol or nomultivol argument indicates whether size calculations should include all volumes when a data set’s allocation includes more than one volume.
If the argument multivol is passed to the LISTDSI function then:
- variables that include size calculations will include the statistics for all volumes rather than just the first one.
If multivol is not specifed on the function (default) or nomultivol is specified then:
- the calculations are done only for the first volume.
Here's an example where the code on the left uses nomultivol and the code on the uses multivol:
As you can see the multivol (right) includes the allocation statistics for all volumes.
For PDSE data sets:
- The new SYSALLOCPAGES variable returns the number of pages allocated to a PDSE
- The new SYSUSEDPERCENT variable returns the percentage of pages used.
These variables along with the existing SYSUSEDPAGES are always returned for PDSE data set.
- SYSALLOCPAGES Indicates the number of pages allocated to a PDSE
- SYSUSEDPERCENT Indicates a percentage of pages used out of the pages allocated for a PDSE. A number from 0 to 100, rounded down to the nearest integer value.
Here's an example:
If available, LISTDSI will return additional information about a data set created on an EAV (extended address volume) volume.
For a data set created on an EAV volume (EATTR=OPT), LISTDSI will return:
- dataset creation time in the variable SYSCREATETIME
- the creating jobname in the variable SYSCREATEJOB
- the creating step name in the variable SYSCREATESTEP
- SYSCREATETIME Indicates the time a data set was created in the format hh:mm:sswhere hh is hours since midnight, mm is minutes since midnight, and ss is seconds since midnight. This variable is only set for EAV data sets and can be used together with the SYSCREATE variable to determine the date and time when a data set was created.
- SYSCREATEJOB For EAV data sets, if available, indicates the name of the job that created the data set.
- SYSCREATESTEP For EAV data sets, if available, indicates the name of the job step that created the data set.
So for example, assuming the listed dataset was created by a job through JCL submission and allocated on an EAV volume:
For more information on System z and the z/OS operation system see the following IBM Redbooks publications:
ABCs of z/OS System Programming: Volume 1, SG24-6981-02
ABCs of z/OS System Programming Volume 2, SG24-6982-02
ABCs of z/OS System Programming Volume 3, SG24-6983-03
ABCs of z/OS System Programming: Volume 4, SG24-6984-00
ABCs of z/OS System Programming: Volume 5, SG24-6985-02
ABCs of z/OS System Programming Volume 6, SG24-6986-00
ABCs of z/OS System Programming Volume 7, SG24-6987-01
ABCs of z/OS System Programming Volume 8, SG24-6988-01
ABCs of z/OS System Programming: Volume 9, SG24-6989-05
ABCs of z/OS System Programming Volume 10, SG24-6990-04
ABCs of z/OS System Programming Volume 11, SG24-6327-0
ABCs of z/OS System Programming Volume 12, SG24-7621-00
ABCs of z/OS System Programming Volume 13, SG24-7717-01