Page 1 of 1

Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 1:02 am
by mvora
Hello all,

I am new to the world of Mainframes and I am currently studying the evolution of z/OS from its primitive MVS OS.
One question that struck my mind is:

Why is the data set name on a DASD (Direct Access Storage Device) restricted to only 44 characters and for a Tape Drive to 17 characters.
What is so important about these numbers, that we the OS doesn't allow us to have a name of 45 characters or more ? OR the other question would be, why is it not restricted to 30 or 40 (or any other value) characters?

It will be more than helpful for me to understand the internals of the system if you can enlighten me on this.
Thank You in advance.
-Megh

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 1:37 am
by Robert Sample
First, tape data set names are NOT restricted to 17 characters -- they can be 44 characters just like any other data set. HOWEVER, the tape label will only store the last 17 characters of the data set name, which may be where your misconception comes from.

z/OS and its predecssors go back to 1964, a time when jobs were created by punching holes in cards and having a card reader read each card and interpret the holes into characters. IBM set the 44-character data set name length in this era; since a card only used columns 1 through 71 it made no sense to allow very long data set names since otherwise there would be the need to allow for continuation of names across cards, and the complications would grow quickly. IBM is a firm proponent of keeping software backward-compatible, so they've never changed the 44-byte restriction. Backward compatability is a good thing -- our site has programs that were last compiled before 1980 and still run fine -- try THAT with a Windows 286 program!

When Unix System Services (USS) came along, the world had changed and IBM allowed (IIRFC) 1024 characters for file names under USS. Different times, different requirements, different lengths result.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 1:41 am
by steve-myers
It's actually a good question, though I'm not sure anyone can answer it any more.

To some extent, it's roughly similar to answering the question about whether the chicken or egg came first. I'll try the tape question first: it might be easier.

Tape labels were inherited, at least to some extent, from second generation systems, so the identification area follows its limits. Second generation tape formats were reasonably mature, so there was little incentive to "improve" them or alter them. As Mr. Sample mentioned, you can have 44 character dataset names on tape; it's just that the labels retain only the last 17 characters.

Disk systems, on the other hand, really were effectively new with System/360. Granted some of the hardware, like the 2302 and 2311, was improved versions of second generation hardware, but the VTOC was strictly a System/360 invention, so the size of the dataset name was fairly arbitrary. I know 44 bytes seemed like a lot when I transitioned to OS/360 in 1967 and 1968, but I certainly have no idea why that limit was selected. Partitioning of disk drives into datasets in the way it was done in DOS/360 and OS/360 seemed like a HUGE improvement over what was done in second generation systems. By current standards, space management in disk volumes done in OS/360 seems very primitive, but it worked and seemed to be reliable (and is basically unchanged), even though OS/360 itself was rather less than reliable.

In any event, DOS/360 and OS/360 standards were passed up to MVS in the early 1970s and z/OS in the early 2000s.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 2:09 am
by Akatsukami
Robert Sample wrote:z/OS and its predecssors go back to 1964, a time when jobs were created by punching holes in cards and having a card reader read each card and interpret the holes into characters. IBM set the 44-character data set name length in this era; since a card only used columns 1 through 71 it made no sense to allow very long data set names since otherwise there would be the need to allow for continuation of names across cards, and the complications would grow quickly.

To expand on that answer, it is possible to write the statement:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
//STEPNAME.PROCSTEP DD DSN=ABCDEFGH.IJKLMNOP.QRSTUVWX.YZABCDEF.GHIJKLMO

Note that this exactly fills one card.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 3:02 am
by Ed Goodman
Also, it's five nodes of eight bytes each. Add the six byte sequence number and it takes you 69 bytes:
123456//12345678 dd dsn=12345678.12345678.12345678.12345678.12345678

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 4:51 am
by BillyBoyo
Akatsukami wrote:[...]
----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
//STEPNAME.PROCSTEP DD DSN=ABCDEFGH.IJKLMNOP.QRSTUVWX.YZABCDEF.GHIJKLMO

Note that this exactly fills one card.


JCL Manual wrote:Continuing the Parameter Field:


1. Interrupt the field after a complete parameter or subparameter, including the comma that follows it, at or before column 71


However, if I do want a DISP (or whatever) on a fully-populated five-node DSN overriding in an eight-character step in an eight-character proc, then I can also code the DISP (or whatever) first, and the long DSN on the continuation line.

To continue the theme, if six nodes were allowed, you wouldn't be able to put the DSN on a line with an eight-character DD NAME, because you couldn't get the comma in, to be certain you'd have to always have the DSN on a continuation line.

----+----1----+----2----+----3----+----4----+----5----+----6----+----7-
***************************** Top of Data *****************************
//DDNAME08 DD DSN=ABCDEFGH.IJKLMNOP.QRSTUVWX.YZABCDEF.GHIJKLMO.PQRSTUVW


So, six nodes inconvenient, five nodes convenient enough (if not perfect) and that is 44 characters as Ed has said. Not sure about Ed's sequence numbers, though.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 6:18 am
by steve-myers
Don't forget early OS/360 used DSNAME=xxx, not DSN=xxx, and JCL continuation statements had to start in column 16. Abbreviated keywords and relaxed continuation starts came in about Release 17 if I remember correctly.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 1:03 pm
by BillyBoyo
Well, I knew DSN was short for DSNAME, but can't say as I've ever typed it all out :-)

So, originally a 44-character dsname could not be on a continuation line, and could only have a maximum of five characters for the file name itself. It's a pity we can't check if it was documented that way, or whether it was one of those things to discover on your own. Could have been one (or two) of those pointless interview questions.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 2:41 pm
by BillyBoyo
BillyBoyo wrote:Well, I knew DSN was short for DSNAME, but can't say as I've ever typed it all out :-)

So, originally a 44-character dsname could not be on a continuation line, and could only have a maximum of five characters for the file name itself. It's a pity we can't check if it was documented that way, or whether it was one of those things to discover on your own. Could have been one (or two) of those pointless interview questions.


Make that four characters, to get the comma in. Means you can just code an override in a proc, as long as length of ddname and stepname are not more than three combined.

Re: Why MVS OS DataSet restricted to 44 characters?

PostPosted: Wed Dec 07, 2011 3:01 pm
by BillyBoyo
Make that, since I don't know what column the original statement could start in, I don't know and I give up :-) Bugging me.