Close Menu
geekfence.comgeekfence.com
    What's Hot

    UiPath’s acquisition of WorkFusion marks the shift toward verticalized agentic solutions  – Everest Group Research Portal

    February 21, 2026

    Meet the ISPs Driving FTTH Deployment in South Africa

    February 21, 2026

    Asha Sharma named EVP and CEO, Microsoft Gaming

    February 21, 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 Read0 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 CyberArk uses Apache Iceberg and Amazon Bedrock to deliver up to 4x support productivity

    February 19, 2026

    Business Analytics: Essential Tools, Techniques and Skills for Data-Driven Success

    February 18, 2026

    How Cities Use AI to Improve Playground Design

    February 17, 2026

    Can You Build a Secure and Scalable Candy AI Clone Without Overengineering?

    February 16, 2026

    How Deutsche Börse Federates Data Governance with Control

    February 15, 2026

    What is Prompt Chaining?

    February 14, 2026
    Top Posts

    Hard-braking events as indicators of road segment crash risk

    January 14, 202618 Views

    Understanding U-Net Architecture in Deep Learning

    November 25, 202516 Views

    How to integrate a graph database into your RAG pipeline

    February 8, 202610 Views
    Don't Miss

    UiPath’s acquisition of WorkFusion marks the shift toward verticalized agentic solutions  – Everest Group Research Portal

    February 21, 2026

    UiPath’s acquisition of WorkFusion reflects the ongoing shift in automation from horizontal enablement to vertically specialized, agentic…

    Meet the ISPs Driving FTTH Deployment in South Africa

    February 21, 2026

    Asha Sharma named EVP and CEO, Microsoft Gaming

    February 21, 2026

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

    February 21, 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

    UiPath’s acquisition of WorkFusion marks the shift toward verticalized agentic solutions  – Everest Group Research Portal

    February 21, 2026

    Meet the ISPs Driving FTTH Deployment in South Africa

    February 21, 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.