Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unix equavalent of MVS GDG

568 views
Skip to first unread message

Leigh Roberts

unread,
Feb 21, 2000, 3:00:00 AM2/21/00
to
Do you know of a technique to emulate MVS generation data groups withing
Unix shell scripts?

Leigh Roberts

peter@icke-reklam.manet.dot..nu

unread,
Feb 22, 2000, 3:00:00 AM2/22/00
to
Leigh Roberts <leigh_...@yahoo.com> wrote:
> Do you know of a technique to emulate MVS generation data groups withing
> Unix shell scripts?

How about giving a brief introduction to what "MVS generation data groups" is ?

> Leigh Roberts

--
--
Peter Håkanson
Manet Networking (At the Riverside of Gothenburg, home of Volvo)
Sorry about my e-mail address, but i'm trying to keep spam out.
peter (at) manet (dot) nu | sed "s/(at)/@/g " | sed "s/(dot)/\./g"|sed "s/ //g"


Lew Pitcher

unread,
Feb 24, 2000, 3:00:00 AM2/24/00
to
Leigh Roberts wrote:
>
> Do you know of a technique to emulate MVS generation data groups withing
> Unix shell scripts?
>
> Leigh Roberts

Absolute GDG numbers or GDG relative numbers?

Absolute GDGs are just sequential numbers, so 'find' the newest (or
highest) number, drop it into a shell variable, and increment it to
get your next GDG number.

With this base, you can then implement GDG rollover (GDG base and #
gens) through math on the absolute GDG number and some (probably
fixed) generation numbers (i.e. keep 5 gens). Compute the absolute GDG
number to be rolled off, and 'rm' it.

Finally, for relative GDG numbers, you'd have to come up with your own
naming syntax, but you should now be able to take a GDG file,
determine the absolute GDG number for the 'current' generation, then
build a list of the current, minus-one, minus-2, etc. generation
numbers. From there, your file manipulation would xlat the relative
GDG to the appropriate absolute GDG.

--
Lew Pitcher

Master Codewright and JOAT-in-training

Lew Pitcher

unread,
Feb 24, 2000, 3:00:00 AM2/24/00
to
pe...@icke-reklam.manet.dot..nu. wrote:

>
> Leigh Roberts <leigh_...@yahoo.com> wrote:
> > Do you know of a technique to emulate MVS generation data groups withing
> > Unix shell scripts?
>
> How about giving a brief introduction to what "MVS generation data groups" is ?
>
> > Leigh Roberts
>
> --
> --
> Peter Håkanson

A GDG (or MVS Generation Data Group) is a file naming structure which
allows you to create a history of files. Similar to the naming of the
'old' file as .backup (or old.file% or old.file~ or ...), each file is
suffixed with a generation number (starting at absolute generation 0).
Each new generation of the file gets an absolute generation number
that is one more than the previous generation. I.e.
file.000 is the first generation, file.001 is the second generation,
etc.

MVS allows for the definition of a maximum number of files to be
stored in a GDG (by filename), so old files roll off and delete once
the new file is created.

MVS also allows for 'relative' generations, so you can say "give me
the current generation" or "give me the generation one back from the
current generation", etc. If current generation is file.005, then the
"minus-one" generation is file.004. Likewise, the next generation (or
plus-one generation) would be file.006. So, a hypothetical text editor
might input the current generation of file "MyFile" (MyFile.005) and
create as output the next generation of "MyFile" (MyFile.006).

peter@icke-reklam.manet.dot..nu

unread,
Feb 26, 2000, 3:00:00 AM2/26/00
to
Lew Pitcher <lpit...@yesic.com> wrote:
> pe...@icke-reklam.manet.dot..nu. wrote:
>>
>> Leigh Roberts <leigh_...@yahoo.com> wrote:
>> > Do you know of a technique to emulate MVS generation data groups withing
>> > Unix shell scripts?
>>
>> How about giving a brief introduction to what "MVS generation data groups" is ?
>>
>> > Leigh Roberts
>>
>> --
>> --
>> Peter Håkanson

Ahh, looks like a new incarnation of DIGITALS version numers of files
(dates back to the dark ages < 80 )

In the DEC world files could be suffixed by ';nn' where nn is a version
number of a particular file. (nn was limited to < 32767).

Whenever a file was created, if a file with the same name existed, the
new one would keep the same name but one version number higher. Very
nice. No files would disabbpear until a specifig 'PURGE' (VAX/VMS)
command was given, the PURGE could be told to keep 'n' versions.

No. Something like this does not exists (nativly) in un*x. It would break
the notion that the ';' itself is a valid filename component. But
nothing prevents you writing an application that adheres to this
naming scheme. I do not know of any such application.

The lack of version numbers instead forced the un*x community to
create revision-control systems like rcs and cvs. They are even
more powerful then the 'version-thing'.

The tecnique that comes closest is the "netapp" fileserver,
they can take 'snapshots' any time you like, which creates a
directory called .snapshot containing the directories files
at specific times (named after date+time where the snapshot is made).
Since only links to files is stored it does not take any storagespace
unless filechange activity is high. And yes, this is transparent
for any host that mounts the netapp's filesystems.

Regards
Peter H (still has a microvax running at home!)


> A GDG (or MVS Generation Data Group) is a file naming structure which
> allows you to create a history of files. Similar to the naming of the
> 'old' file as .backup (or old.file% or old.file~ or ...), each file is
> suffixed with a generation number (starting at absolute generation 0).
> Each new generation of the file gets an absolute generation number
> that is one more than the previous generation. I.e.
> file.000 is the first generation, file.001 is the second generation,
> etc.

> MVS allows for the definition of a maximum number of files to be
> stored in a GDG (by filename), so old files roll off and delete once
> the new file is created.

> MVS also allows for 'relative' generations, so you can say "give me
> the current generation" or "give me the generation one back from the
> current generation", etc. If current generation is file.005, then the
> "minus-one" generation is file.004. Likewise, the next generation (or
> plus-one generation) would be file.006. So, a hypothetical text editor
> might input the current generation of file "MyFile" (MyFile.005) and
> create as output the next generation of "MyFile" (MyFile.006).

> --
> Lew Pitcher

> Master Codewright and JOAT-in-training

--

Lew Pitcher

unread,
Feb 28, 2000, 3:00:00 AM2/28/00
to
pe...@icke-reklam.manet.dot..nu. wrote:
>
> Lew Pitcher <lpit...@yesic.com> wrote:
> > pe...@icke-reklam.manet.dot..nu. wrote:
> >>
> >> Leigh Roberts <leigh_...@yahoo.com> wrote:
> >> > Do you know of a technique to emulate MVS generation data groups withing
> >> > Unix shell scripts?
> >>
> >> How about giving a brief introduction to what "MVS generation data groups" is ?
> >>
> >> > Leigh Roberts
> >>
> >> --
> >> --
> >> Peter Håkanson
>
> Ahh, looks like a new incarnation of DIGITALS version numers of files
> (dates back to the dark ages < 80 )

Well, MVS GDGs date back to at least that time as well. My experience
with them starts around 1978, and I believe that MVS had them prior to
that date.

K Stahl

unread,
Feb 28, 2000, 3:00:00 AM2/28/00
to
Lew Pitcher wrote:
>
> >
> > Ahh, looks like a new incarnation of DIGITALS version numers of files
> > (dates back to the dark ages < 80 )
>
> Well, MVS GDGs date back to at least that time as well. My experience
> with them starts around 1978, and I believe that MVS had them prior to
> that date.
>
> --
> Lew Pitcher
>
> Master Codewright and JOAT-in-training

I think that they have been around since at least the brown Brown book.

Bet there are a lot of people who haven't heard of that reference in a few
years. I still have the brown Brown book as well as the blue Brown book.

John Simpson

unread,
Feb 28, 2000, 3:00:00 AM2/28/00
to

Is that like the yellow booklet version of the yellow card version of
the green card?? (System/360 Reference Summary)
--
John H. Simpson Phone: 503-450-2667 FAX: 503-450-3629
CNF AdTech Center. (CNF Transportation, Inc.)
1717 NW 21st St.
Portland, OREGON 97209 USA
for e-mail, remove _not_oj_ from address

cLIeNUX user

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
lpit...@yesic.com...
>Leigh Roberts wrote:
>>
>> Do you know of a technique to emulate MVS generation data groups withing
>> Unix shell scripts?
>>

From the unix point of view that sounds like a suite of things, not just
the shell. In particular, what is creating the file in the first place?
GNU cp has fancy options for creating backup suffixes, for example.

OR, you want a revision control system. ?

Rick Hohensee
cLIeNUX user 0


cLIeNUX user

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to
r@your_host.com...
ah...

from man cp

GNU BACKUP OPTIONS

The GNU versions of programs like cp, mv, ln, install and patch will
make a backup of files about to be overwritten, changed or destroyed
if that is desired. That backup files are desired is indicated by the
-b option. How they should be named is specified by the -V option. In
case the name of the backup file is given by the name of the file
extended by a suffix, this suffix is specified by the -S option.
-b, --backup
Make backups of files that are about to be overwritten or
removed.
-S SUFFIX, --suffix=SUFFIX
Append SUFFIX to each backup file made. If this option is not
specified, the value of the SIMPLE_BACKUP_SUFFIX environment


K Stahl

unread,
Mar 1, 2000, 3:00:00 AM3/1/00
to

It was a book for MVS JCL.

0 new messages