The Linux Foundation Projects
Skip to main content
Blog | CBT Tape

z/OS zFS ISPF Tools

By | June 12, 2023

Written by Lionel B. Dyck, Open Mainframe Project Ambassador and Contributor to CBT Tape

This article describes a collection of tools for working with zFS datasets that the author either developed or created an ISPF dialog to drive. The tools are all open source, provided with no strings attached, and the usual caveat that you should verify in your own environment.

zFS Tools under ISPF

In the middle of the last decade one of my tasks was to administer the OMVS, also known as USS or Unix System Services, environment of z/OS. At the time I was somewhat familiar with Linux, having worked with it under z/VM in the prior decade, and I could spell OMVS – not a great start but it was a start.

I found that I had several repeated tasks and began to document them. Then, because I’m basically always looking for ways to automate tasks, and being somewhat proficient with ISPF dialog development, I started to create dialogs for these tasks so that I would be able to easily repeat them, and so that others could do so as well.

As you will see, these are mostly simple tasks yet ones that need to be done on a periodic basis, and mostly those that may not be easily remembered when needed. The ISPF dialogs are not super sophisticated or complex, but they do make it easy to perform the required action.

Thus, my collection of zFSToolsbegan and evolved into this:

Dialog Notes:

  1. These ISPF dialogs are written in REXX and utilize the BPXWUNIX service[1].
  2. Where possible, existing IBM dialogs and services are used (why reinvent the wheel?).
  3. Some of the dialogs require that the user have OMVS superuser authority[2] and are identified by a single * on the menu.
  4. The dialogs also use the STEMEDIT utility that is found in the CBTTape File 183.
  5. Option 11, zLSOF, requires read access to SYS1.SBPXEXEC, which is distributed with z/OS by IBM.
  6. There is no ISPF tutorial for this dialog as I felt it was reasonably self-explanatory (and I didn’t have a lot of time while setting up and configuring the OMVS environment as part of my-then job).

Where To Get It

  1. https://github.com/lbdyck/zFStools;
  2. https://www.cbttape.org in File 314;
  3. STEMEDIT from https://www.cbttape.org/ in File 183.

zfsadm

Documentation on IBM’s zfsadm can be found in the “z/OS File Systems Administration” manual, chapter “zfsadm – The zfsadm command suite“, or on IBM’s documentation web site.

Note that this article will not go into detail on the zfsadm commands; please read the excellent IBM documentation.

The Tools

Backup and Restore

The Backup dialog uses IDCAMS to make a backup (unload) of the zFS dataset:

The Restore dialog will take the backup/unload and create a new zFS dataset:

Alloc

The Alloc dialog is a simple front end to the IDCAMS DEFINE service to allocate the zFS dataset and then it invokes the zfsadm format service to format the zFS for use.

Rename

The Rename dialog uses the IDCAMS ALTER service to rename the zFS dataset providing the zFS is not mounted.

Mount

The Mount dialog invokes the IBM provided ISPF dialog to mount a zFS.

UnMount

The UnMount dialog displays the IBM ISPF dialog displaying the current mounted file systems. From this the user can easily select an individual filesystem (zFS) to be unmounted.

zfsadm

The zfsadm option displays a menu of some IBM delivered zfsadm tools (not all are supported currently):

aggrinfo

Display information on the attached zFS file systems (aggregates):

configquery

fsinfo

grow

help

Display help information on the various zfsadm commands:

(As you can see, the zfsadm menu does not support all zfsadm commands at this time.)

level

lsaggr

List the attached aggregates:

lsls

List mounted file system information:

lssys

List the systems in the XCF group for zFS:

shrink

The zfsadm shrink command can be used to release unused space in a mounted zFS:

query

This is a menu of the zfsadm query options:

Try each of these – you may find several that are useful. It is possible that not all query options are currently on the menu, as IBM introduces new operands as needed. (Adding newer options is a project for the near future).

Mount FS

Display the mounted zFS datasets by File System using the IBM provided dialog:

Mount MP

Display the mounted ZF datasets by mount point using the IBM provided dialog:

zFSUse

Display the mounted zFS file system by usage query:

Sample display when the Percentage is set to 90:

zLSOF

List all users of the mounted file systems:

zFSCopy

Generate the DFDSS (ADRDSSU) JCL to copy a zFS

Sample generated JCL:

zFSSizer

Generate an appropriate size for a zFS:

Sample use:

Remount

While you can use ISPF 3.17 with some additional clicks to remount a mounted zFS filesystem changing from Read Only (RO) to Read Write (RW), or vice versa, it can be challenging to remember the path. This dialog uses the TSO UNMOUNT command with the REMOUNT keyword to perform the toggle.

With this you don’t have to remember the path, and you don’t have to enter su to change to UID 0 to perform the remount.

This dialog has an ISPF Tutorial panel behind it:

Conclusion

While none of these tasks are complex, they are something that needs to be done periodically. With how busy we all are, finding our notes on how to accomplish these tasks could take longer than the task itself. This collection of ISPF dialogs removes the need to have to find notes, or find the documentation, for them. Just start the dialog and do it and then get on with other things.

[1] Documented in the “z/OS Using REXX and z/OS UNIX System Services” manual, chapter “z/OS UNIX REXX functions” or on IBM’s documentation web site.

[2] Requires at least READ access to RACF resource FACILITY/BPX.SUPERUSER or its equivalent resource in other external security managers (ESM).