Close Menu
geekfence.comgeekfence.com
    What's Hot

    Young People Programme inspires storytelling in Dublin

    April 13, 2026

    The EU appoints Anthony Whelan as its top competition official; Whelan says he will press ahead with Big Tech investigations despite President Trump’s pressure (Barbara Moens/Financial Times)

    April 13, 2026

    A philosophy of work | MIT News

    April 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 Read3 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

    From Frameworks to Security: A Complete Guide to Web Development in Dubai

    April 13, 2026

    GLM-5.1: Architecture, Benchmarks, Capabilities & How to Use It

    April 12, 2026

    How to Shift from CCM to CXM: Why Customer Communications Must Become Conversational

    April 11, 2026

    Introducing workload simulation workbench for Amazon MSK Express broker

    April 9, 2026

    Collaborative Analytics on Databricks | Databricks Blog

    April 8, 2026

    Data Annotation Outsourcing and Risk Mitigation Strategies

    April 7, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202528 Views

    Hard-braking events as indicators of road segment crash risk

    January 14, 202624 Views

    Redefining AI efficiency with extreme compression

    March 25, 202622 Views
    Don't Miss

    Young People Programme inspires storytelling in Dublin

    April 13, 2026

    As part of Canon’s ongoing commitment to delivering meaningful social value within communities across Ireland,…

    The EU appoints Anthony Whelan as its top competition official; Whelan says he will press ahead with Big Tech investigations despite President Trump’s pressure (Barbara Moens/Financial Times)

    April 13, 2026

    A philosophy of work | MIT News

    April 13, 2026

    From Frameworks to Security: A Complete Guide to Web Development in Dubai

    April 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

    Young People Programme inspires storytelling in Dublin

    April 13, 2026

    The EU appoints Anthony Whelan as its top competition official; Whelan says he will press ahead with Big Tech investigations despite President Trump’s pressure (Barbara Moens/Financial Times)

    April 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.