Close Menu
geekfence.comgeekfence.com
    What's Hot

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Big Data»How to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily
    Big Data

    How to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily

    AdminBy AdminFebruary 21, 2026No Comments4 Mins Read11 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    How to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Mainframe programmers are problem-solvers. In today’s large, complex data centers, we’re often faced with ad-hoc questions from management – questions that echo the old National Enquirer slogan, “Inquiring Minds Want to Know.” And management usually wants answers right now:

    • What does this dataset look like?
    • What are its characteristics?
    • How much space does it occupy?
    • When was it created and last referenced?

    For a single dataset, this sort of information can usually be obtained with a glance at an ISPF panel or two. For a list of datasets, though, it’s not so simple. We need to obtain detailed data for each dataset, possibly keep track of running totals, and provide a report.

    Why REXX and LISTDSI Are a Natural Fit

    The REXX programming language is ideal for solving these sorts of problems, and the REXX LISTDSI function allows the programmer to easily obtain all sorts of information about a z/OS dataset.

    LISTDSI returns data in well over 30 variables that can tell us everything from the dataset’s organization and record length to its encryption key label, number of directory blocks, and SMS class names.

    When used in a loop to read an input list of dataset names, LISTDSI variables like SYSALLOC and SYSUSED can be accumulated to keep a running total of disk space. Other variables, like SYSEXPIRE and SYSUPDATED, can be used to identify potential problems – for example, disk datasets that have expired or have been changed but not backed up.

    Running LISTDSI in TSO or Batch

    LISTDSI is a TSO/E external function and must run in a TSO address space. This is usually not a problem, however, as it’s possible to run TSO in batch simply by specifying PGM=IKJEFT01.

    The simplest format of LISTDSI is simply a REXX function specifying the dataset name, for example:

    x = LISTDSI(the-dataset)

    where ‘the-dataset’ is a variable containing the single dataset name for which we want information.

    The variable ‘x’, the function code, is necessary because LISTDSI must be called as a REXX function. A zero function code indicates success, 4 indicates partial success (some but not all data returned), and 16 indicates a failure.

    The actual dataset information is placed in numerous predefined REXX variables, all of which begin with the characters ‘SYS’ – such as SYSVOLUME, SYSDSORG, SYSRECFM, and so on. The contents of these variables can then be written out using REXX ‘SAY’ statements or used for other processing in the exec.

    ProductSyncsortHow to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily Storage Management

    Take control of IBM Z storage with automated, reliable, and cost-optimized management.

    Learn more

    Optional Parameters That Return Even More Detail

    By default, LISTDSI simply obtains information about the dataset from the catalog and the volume VTOC. However, several additional parameters can follow the dataset name in the LISTDSI call to return further information, including directory block counts and SMS class names.

    The most important of these parameters are:

    • RECALL/NORECALL, which controls whether DFSMShsm is allowed to recall datasets from archive during LISTDSI processing
    • SMSINFO/NOSMSINFO, which returns the class names for SMS-managed datasets.

    Known Limitations to Be Aware Of

    There are, unfortunately, still a few limitations to LISTDSI processing.

    No information is returned for tape or Unix Systems Services files, and generation dataset names must be fully specified (no relative GDGs). For VSAM datasets, only a limited subset of information is returned (SYSVOLUME, SYSUNIT, and SYSDSORG).

    It’s possible these drawbacks will be removed in a future z/OS release. Even with these limitations, however, LISTDSI is an extraordinarily simple way to get detailed information about z/OS datasets.

    That information is returned in easy-to-use REXX variables, and provides a quick way for the programmer – facing a sudden demand for data – to provide what’s needed, when it’s needed, to satisfy those inquiring managerial minds.

    Example: Displaying Key LISTDSI Variables

    The figure below shows a simple REXX exec that displays some of the more interesting LISTDSI variables for a specified dataset name, including the date and time the dataset was created:

    How to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily - Precisely

    Turning LISTDSI Output into Operational Insight

    LISTDSI gives mainframe teams a fast, flexible way to extract critical dataset details using familiar REXX constructs – making it easier to answer questions, spot issues, and keep storage information flowing when it matters most.

    To go even further and gain deeper visibility, automation, and control across your storage environment, learn more about how SyncsortHow to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily Storage Management helps simplify and optimize z/OS storage operations.

    The post How to Use the REXX LISTDSI Function to Get z/OS Dataset Information Quickly and Easily appeared first on Precisely.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    How GPU acceleration builds billion-scale vector indexes on Amazon OpenSearch Service

    August 12, 2026

    Modern Risk Demands a Real-Time Foundation: The CRO’s Mandate

    August 11, 2026

    Which Facial Age Providers Hold Up

    August 10, 2026

    Bitcoin ETFs Just Pulled In $170 Million. Here’s What It Doesn’t Prove |

    August 9, 2026

    Deploying Semantic Views on Snowflake

    August 8, 2026

    How to Reduce Postage Costs with Digital-First Communications

    August 7, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202585 Views

    The Next Paradigm in Efficient Inference Scaling – The Berkeley Artificial Intelligence Research Blog

    May 16, 202648 Views

    Is it too late to start learning AI and machine learning in my 30s or 40s?

    April 9, 202648 Views
    Don't Miss

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Independent MP Andrew Wilkie has taken the fight over gambling reform to the National Anti-Corruption…

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    With a feel for physics, AI models simulate a wider range of real-world scenarios | MIT News

    August 13, 2026

    Monitoring beyond SNMP: Turning your network into a sensor

    August 13, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Wilkie refers gambling concerns to anti-corruption commission

    August 13, 2026

    Lumen ready for AI traffic rush – with programmable fabric and “more fiber than anyone”

    August 13, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.