I wonder whether anyone ever performed a skit where a Linux admin talks to a mainframer? I guess the conversation would be similar to this:
“So, I’m like, touching a file. What’s all this cylinder, block size, record stuff?” — “… It’s data set! Data set!!”
“If it’s not a directory path, then what is it!?” — “A partitioned data set.” — “Which just happens to have a really long name with lots of delimiters, hm?” — *rolls eyes*
“Let me get this right, you have 37 ways to copy a file, but no web browser?” — *sigh*
“I dunno whether I ‘cataloged’ the ‘data set’…? Can’t I just, like, grep for it?” — *SIGH*
“How to I reboot this thing?” — “… Out! Out now!”
I don’t claim to fully understand data sets, catalogs, and access methods, I’m pretty much scraping the surface. This is what I remember about data sets from the first week of a z/OS basics training (the full training takes two months):
In short, there are no files or folders, only data sets. A mainframe user creates data sets with his user name as the first word of the file name. The first word is called high-level qualifier (HLQ). Say, your user name is SMITH019, and you’re working on your second project. Then you may create a data set with a data set name (DSN) such as
So, instead of putting your files in a home directory, you name your data sets with the same HLQ prefix.
Now, instead of creating sub-folders, you add qualifiers to the data set name. Each qualifier can be up to 8 characters long, and is separated by a period. A DSN can be 44 characters maximum. The last word is called last-level qualifier (LLQ). For example in
SMITH019.PROJECT2.TESTS.REXX, SMITH019 is the HLQ, and REXX is the LLQ.
(Of course in real life, mainframers never name data sets PROJECT2. They’d name them HKF, XZSZ$H, JSSFD, or ISDFSDFK, or whatever hitting the keyboard produced, that is not yet taken by the other 1000 users…)
In your user profile, you can change the “current prefix”, e.g. from SMITH019 to SMITH019.PROJECT2.TESTS. This means that from now on, all data set names are relative to this prefix. In Linux or DOS, you would similarly “change your working directory” (
In other operating systems, you save files into folders. On the mainframe, you partition a data set to become a “library” of other data sets. A partitioned data set (PDS) has members, like a folder has files. When you access a data set member in a PDS, it looks like this
SMITH019.PROJECT2.TESTS.REXX(MYSCRIPT). The data set MYSCRIPT is one of the members of the PDS named REXX. Just like folders for files, you use PDS to group data sets.
In Windows and other operating systems, files have suffixes that indicate the type of file: .txt, .png, .exe, .app, .doc, .sh, etc. Data sets don’t have suffixes. Still there is a loose convention how to indicate the file type: You can create a PDS with the type as DSN (data set name), and save the respective data sets as PDS members. For example SMITH019.PROJECT2.TESTS.CLIST(MYSCRIPT) would be a clist script, while SMITH019.PROJECT2.TESTS.REXX(MYSCRIPT) is a rexx script, etc.
You see that in z/OS, you can do the same things as in other operating systems, only the basic concepts are segmented in quite a different way! This is why I feel that Linux, Unix, Windows, and Mac OS X are all in one “category” — they at least use basic terms like “file and folder” in the same way, in contrast to z/OS.