Mainframe programmers are problem-solvers. In in the present day’s giant, complicated knowledge facilities, we’re usually confronted with ad-hoc questions from administration – questions that echo the outdated Nationwide Enquirer slogan, “Inquiring Minds Wish to Know.” And administration normally desires solutions proper now:
- What does this dataset appear like?
- What are its traits?
- How a lot house does it occupy?
- When was it created and final referenced?
For a single dataset, this form of data can normally be obtained with a look at an ISPF panel or two. For a listing of datasets, although, it’s not so easy. We have to get hold of detailed knowledge for every dataset, probably preserve observe of operating totals, and supply a report.
Why REXX and LISTDSI Are a Pure Match
The REXX programming language is right for fixing these kinds of issues, and the REXX LISTDSI perform permits the programmer to simply get hold of all kinds of details about a z/OS dataset.
LISTDSI returns knowledge in effectively over 30 variables that may inform us every thing from the dataset’s group and document size to its encryption key label, variety of listing blocks, and SMS class names.
When utilized in a loop to learn an enter checklist of dataset names, LISTDSI variables like SYSALLOC and SYSUSED will be collected to maintain a operating whole of disk house. Different variables, like SYSEXPIRE and SYSUPDATED, can be utilized to establish potential issues – for instance, disk datasets which have expired or have been modified however not backed up.
Operating LISTDSI in TSO or Batch
LISTDSI is a TSO/E exterior perform and should run in a TSO tackle house. That is normally not an issue, nonetheless, because it’s attainable to run TSO in batch just by specifying PGM=IKJEFT01.
The best format of LISTDSI is solely a REXX perform specifying the dataset identify, for instance:
x = LISTDSI(the-dataset)
the place ‘the-dataset’ is a variable containing the only dataset identify for which we would like data.
The variable ‘x’, the perform code, is critical as a result of LISTDSI have to be known as as a REXX perform. A zero perform code signifies success, 4 signifies partial success (some however not all knowledge returned), and 16 signifies a failure.
The precise dataset data is positioned in quite a few predefined REXX variables, all of which start with the characters ‘SYS’ – similar to SYSVOLUME, SYSDSORG, SYSRECFM, and so forth. The contents of those variables can then be written out utilizing REXX ‘SAY’ statements or used for different processing within the exec.
ProductSyncsort Storage Administration
Take management of IBM Z storage with automated, dependable, and cost-optimized administration.
Non-compulsory Parameters That Return Even Extra Element
By default, LISTDSI merely obtains details about the dataset from the catalog and the amount VTOC. Nevertheless, a number of further parameters can comply with the dataset identify within the LISTDSI name to return additional data, together with listing block counts and SMS class names.
Crucial of those parameters are:
- RECALL/NORECALL, which controls whether or not DFSMShsm is allowed to recall datasets from archive throughout LISTDSI processing
- SMSINFO/NOSMSINFO, which returns the category names for SMS-managed datasets.
Identified Limitations to Be Conscious Of
There are, sadly, nonetheless a couple of limitations to LISTDSI processing.
No data is returned for tape or Unix Programs Providers recordsdata, and technology dataset names have to be totally specified (no relative GDGs). For VSAM datasets, solely a restricted subset of data is returned (SYSVOLUME, SYSUNIT, and SYSDSORG).
It’s attainable these drawbacks can be eliminated in a future z/OS launch. Even with these limitations, nonetheless, LISTDSI is an awfully easy solution to get detailed details about z/OS datasets.
That data is returned in easy-to-use REXX variables, and offers a fast method for the programmer – dealing with a sudden demand for knowledge – to offer what’s wanted, when it’s wanted, to fulfill these inquiring managerial minds.
Instance: Displaying Key LISTDSI Variables
The determine beneath reveals a easy REXX exec that shows among the extra attention-grabbing LISTDSI variables for a specified dataset identify, together with the date and time the dataset was created:
Turning LISTDSI Output into Operational Perception
LISTDSI offers mainframe groups a quick, versatile solution to extract crucial dataset particulars utilizing acquainted REXX constructs – making it simpler to reply questions, spot points, and preserve storage data flowing when it issues most.
To go even additional and acquire deeper visibility, automation, and management throughout your storage surroundings, study extra about how Syncsort
Storage Administration helps simplify and optimize z/OS storage operations.
The publish How you can Use the REXX LISTDSI Operate to Get z/OS Dataset Data Shortly and Simply appeared first on Exactly.

