The z/OS catalog is indeed a wonderful thing. Of course, one thing that
makes it easier is that a data set name can be a maximum of 44 characters
long, rather than about 255 for UNIX and Windows path+file name. Also, the
z/OS data set name is basically a "flat" name space, rather than
hierarchical like UNIX/Windows. Also, we are assuming that there are no
uncatalogued data sets on the system. Which may not be true if you have
multiple, independent z/OS images or sysplexes.

I'm not much of a Windows user any more (only at work for things like email
and such simple stuff - because I'm forced to). But I use Linux both at
work and home. I love the Linux "locate" command. It is the closest
equivalent to the z/OS catalog, conceptually. Now, if you know that a file
name is unique (such as it _must_ be in z/OS in order to be catalogued),
you could emulate (somewhat) a catalog lookup in a script by doing
something like:


#!/bin/sh
lf=$(locate somefile|head -1)
if -z ${lf} then
   echo "File: somefile not found"
   exit 1
fi
cat ${lf} # process the input file


In the line which sets the "lf" variable, I do the locate to find the file
name and pipe it into "head -1" so that I only select the first "hit" if
there are duplicates. This is probably "unwise".

Also, the locate command actually does a data base type lookup of the
specified name or pattern. On most Linux systems, this data base is not
updated in "real time" but usually only once a day via the "updatedb"
command. So the data base is usually slightly out of date. Hopefully this
is not a big deal since a person will hopefully remember a file name that
they just created. OK, I admit that I sometimes "lose" which subdirectory I
created a file in.

I wish there were a z/OS version of this. It would be really nice if it
were more like the z/OS catalog and actually be maintained in "real time".


On Sun, Nov 24, 2013 at 9:05 AM, Ze'ev Atlas <[email protected]> wrote:

> I do not do too much on z/OS anymore (there aren't too many jobs and they
> don't pay that well.)  So most time I work on Windows or Linux/Unix of some
> variety.  I am surprised that the most striking difference between z/OS and
> the other OSes is not that much emphasized!  So let me please spell it:
>
> In Unix and Windows you need to know where the heck is your file, like:
> aaa/bbb/ccc/ddd/eee/fff/myfile
>
> An wow to you if you do not remember or did not get the information that
> ccc is now qqq.  You'll never find your file anymore!
>
> in z/OS you catalog the file and say:
> myfile
>
> Apparently z/OS is capable of finding the file without any manual
> assistance!  "Manual assistance"?!? didn't we invent computers, big data
> and what not to save menial work.
> :)
>
> ZA
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>



-- 
This is clearly another case of too many mad scientists, and not enough
hunchbacks.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to