IBM's z/OS Data Set File System (DSFS)
The Data Set File System (aka DSFS) is part of z/OS since z/OS 2.5 and provides a game changing approach for the shell (aka UNIX) applications to access z/OS datasets and the z/OS JES2 (and JES3) SPOOL. This means that these users can use their favorite shell tools and applications to process z/OS datasets without having to switch to a 3270 interface or use the z/OS batch environment.
Is it perfect - not yet - but there are IBM Ideas encouraging IBM development to fix the gaps.
By now you are wondering what you can do with DSFS and the answer depends. But let's start with the DSFS filesystem.
The IBM publication (for z/OS 3.1) can be found here https://www.ibm.com/docs/en/zos/3.1.0?topic=guide-overview-zos-data-set-file-system.
Note that there are restrictions - no VSAM, no PDSE member generations, only SYSOUT under your userid, and a few more. And the ls -al will not display the ISPF member statistics.
The Filesystem
The filesystem appears to the user like any other UNIX filesystem. It starts at the mount point /dsfs:
/>ls -al /dsfs
total 24
drwxrwxrwx 6 BPXROOT OMVSGRP 8192 Jul 22 2024 .
drwxr-xr-x 21 BPXROOT ZOWEDEV 8192 Feb 19 16:35 ..
drwxrwxrwx 6 BPXROOT OMVSGRP 8192 Dec 12 12:52 bin
drwxrwxrwx 4 BPXROOT OMVSGRP 8192 Jan 28 2024 rec
drwxrwxrwx 3 BPXROOT OMVSGRP 8192 Jul 22 2024 sysout
drwxrwxrwx 29 BPXROOT OMVSGRP 8192 Sep 28 16:12 txt
Within the dsfs filesystem are four subdirectories:
bin |
File access in binary format |
rec |
Access files in record format |
sysout |
Access SYSOUT in the JES2 or JES3 spool |
txt |
Access files in text format |
I'll be honest that I see little value (for me at least) in the bin and rec directories, so I will focus on the other two.
Navigation with txt
To use z/OS datasets change to the /dsfs directory and then to the appropriate subdirectory.
cd /dsfs/txt
Then change to the high level qualifier where the datasets that you are interested in reside.
cd lbdyck.lionel
At this point you can use the ls
to list the files:
/dsfs/txt/lbdyck.lionel>ls -al
total 116
drwxrwxrwx 17 BPXROOT OMVSGRP 8192 Apr 4 2024 .
drwxrwxrwx 29 BPXROOT OMVSGRP 8192 Sep 28 16:12 ..
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 4 00:00 asm
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 6 00:00 cexec
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 22 00:00 clist
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 21 00:00 doc
drwxrwxrwx 2 BPXROOT OMVSGRP 65536 Feb 23 00:00 exec
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 20 00:00 help
drwxrwxrwx 2 BPXROOT OMVSGRP 16384 Jan 6 00:00 maclib
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 00:00 msgs
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 6 00:00 obj
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 6 00:00 omvs
drwxrwxrwx 2 BPXROOT OMVSGRP 32768 Feb 23 14:07 panels
drwxrwxrwx 2 BPXROOT OMVSGRP 16384 Feb 23 00:00 skels
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 00:00 tables
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 6 00:00 vb
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Jan 6 00:00 vbl
Then change into one of the subdirectories which represent a partitioned data set (PDS):
/dsfs/txt/lbdyck.lionel/exec>cd exec
And then you can list the members - in this example only those members starting with xmiti will be listed.
/dsfs/txt/lbdyck.lionel/exec>ls -al xmiti*
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Apr 20 2022 xmitinfo
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitiof
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Jan 18 2001 xmitiofm
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Dec 10 15:25 xmitip
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitip00
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 2 2021 'xmitipc$'
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Dec 12 2023 xmitipcu
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Nov 19 2009 xmitipds
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitiped
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Jun 3 2002 xmitipem
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipex
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipfb
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipfe
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipfv
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Aug 26 2020 xmitipi
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Nov 19 2009 xmitipic
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Nov 19 2009 xmitipid
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipm
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitipml
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Jan 29 2010 xmitipmu
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitippd
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Jun 29 2018 xmitipsp
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Oct 20 2009 xmitiptd
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Nov 16 2009 xmitiptr
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Dec 1 2005 xmitipui
-rwxrwxrwx 1 BPXROOT OMVSGRP 1 Nov 21 2017 xmitipzp
At this point you can use your favorite editor (i.e. vi, vim, nano, neovim, ...) or other tools such as grep, less, tail, head, sort, ....
Navigation with sysout
This is a fantastic interface to the JES2/3 spool but there are some restrictions:
- You may only view sysout that is owned by your userid
- Open sysout files will be missing the last buffer of written data until the file is closed
- The date and time do not reflect the job start or end times but do have the jobname and JES jobid
Sample list of jobs - yes using the ls
command:
/dsfs/sysout/lbdyck>ls -al
total 20
drwxrwxrwx 10 BPXROOT OMVSGRP 8192 Feb 23 14:18 .
drwxrwxrwx 3 BPXROOT OMVSGRP 8192 Jul 22 2024 ..
drwxrwxrwx 2 BPXROOT OMVSGRP 0 Feb 23 14:18 batchtso.job00559
drwxrwxrwx 2 BPXROOT OMVSGRP 0 Feb 23 09:37 lbdyck.tsu00438
drwxrwxrwx 2 BPXROOT OMVSGRP 0 Feb 23 09:37 lbdyck.tsu00453
drwxrwxrwx 2 BPXROOT OMVSGRP 0 Feb 23 09:37 lbdyck.tsu00470
drwxrwxrwx 2 BPXROOT OMVSGRP 0 Feb 23 14:17 lbdyck.tsu00557
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 09:38 lbdyckau.job02587
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 09:39 lbdyckau.job02590
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 09:39 lbdyckls.job09669
To view a job just cd
into that "directory":
/dsfs/sysout/lbdyck>cd batchtso.job00559/
/dsfs/sysout/lbdyck/batchtso.job00559>dir
total 32
drwxrwxrwx 2 BPXROOT OMVSGRP 8192 Feb 23 14:23 .
drwxrwxrwx 10 BPXROOT OMVSGRP 8192 Feb 23 14:18 ..
t IBM-1047 T=on -rwxrwxrwx 1 BPXROOT OMVSGRP 0 Feb 23 14:18 jes2.jesjcl.3
t IBM-1047 T=on -rwxrwxrwx 1 BPXROOT OMVSGRP 0 Feb 23 14:18 jes2.jesysmsg.4
t IBM-1047 T=on -rwxrwxrwx 1 BPXROOT OMVSGRP 0 Feb 23 14:18 tsoxdd1.systsprt.102
At this point you can use your favorite UNIX tools, commands, or applications to access these as any other UNIX file - you just are not allowed to make updates (no saving).
This is a quick (very quick some would say) introduction to use dsfs. I hope you like it. Let me know in the comments section if you have any questions or comments about this.