dsfs in z/OS: A New Era of File Management

Introduction

Among all the developments we are currently witnessing in z/OS, dsfs stands out as my favorite. The reasons are straightforward. dsfs provides a simple and transparent interface between traditional MVS files and Unix processes.

In recent days, I’ve been experimenting with the Advent of Code 2023. During this time, I’ve performed some interesting tasks using dsfs, which I’d like to describe here:

Notation of dsfs Calls

(Note: Not every use case might make perfect sense, but I aim to demonstrate the power of dsfs when combined with other standard tools.)

The dsfs call typically looks like this:

For the examples, I will use the Userid: LMMB

Detailed information about dsfs can be found here: Data Set File System (DSFS) – IBM Documentation.

Use Cases

Viewing a Mainframe File Over SSH

A common use case is to view a Mainframe Data set. This has never been easier:

Just one line to display a member from a PDS/E from my distributed system or workstation.

Search for a String in all members of a PDS:

*At the time of writing, I did not have access to a grep -r in Unix System Services.

Editing a Mainframe File

In the same way, these files can be edited:

Executing a Load Module

To execute the file:

And it runs.

Including a Debugger:
If we want to debug the file and it requires input through ACCEPT:

Bonus Round: DD Allocation in USS

If the cobol file reads its input through FILE-CONTROL:

…and you want to run this program under USS, you can declare INPUT01 like this:

…and then run the program.

Summary

The scenarios described above are merely a glimpse of what dsfs in z/OS is capable of. The true strength of dsfs lies in its ability to bridge the gap between Unix programs and traditional MVS Data Sets. With dsfs, we are now able to seamlessly employ Unix-based applications and tools to directly and transparently access MVS Data Sets. This integration unlocks a myriad of possibilities that extend far beyond the use cases presented here. Whether it’s complex data processing, automated workflows, or innovative solutions to traditional challenges, dsfs expands the realm of what’s possible in mainframe data management.

Weitere interessante Blogbeiträge