View previous topic :: View next topic
|
Author |
Message |
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
Hi Experts, [spoiler alert: could be stupid..! ]
Just came here out of curiosity,
Are GDG versions are getting stored in a VSAM or any database? I am asking this, because when we access the GDG base without the version name mentioned in JCL, it is acquiring the complete set of versions that belongs to the GDG base. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
The situation you describe is simply how it works. It implies nothing beyond that. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Are GDG versions are getting stored in a VSAM or any database? |
nope...
all dataset info is stored in the catalog and the vtoc.
and data management processes things accordingly |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And I'm pretty certain that you did really mean to say GENERATIONS |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
Hey. Thx.. Thought you guys are away.. and posted it..
Just scared to see u r other posts..
Jokes Apart..
Yes, I was referring Generations.. [versions is really a wrong choice of word]
Again, I suppose catalog is also a VSAM.
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Do you now have what you were looking for?
I'm not sure i've followed the train of thought here . . . |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
Yes.. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
Generation Data Groups (GDG's) bases are simply a record in the catalog that defines the number of associated generations to be kept, and what happens when that specified number of generations is exceeded. (SCRATCH and NOEMPTY options)
If you create a generation (a Generation Data Set ) it is simply a file with a GDG suffix (e.g. GnnnnV00, where nnnn increments by 1 each new generation), that is associated with the GDG base. You can refer to the generations using 'Relative' generation numbers. The latest would be referred to as: GDG.BASE.NAME(0), the next oldest GDG.BASE.NAME(-1) and so on up to the GDG limit (maximum number of defined generations in the GDG base). You can alos refer to them using 'absolute generation numbers which includes the whole file name and suffix)
A catalog (or more specifically a Usercatalog), is a VSAM KSDS with the key being the dataset name of files cataloged within them. In the Mastercatalog there are ALIASes which are usually equal to a file names high level qualifier (can be up to 3-4 qualifiers though potentially if multi-level alias is enabled), and the alias points to an associated Usercatalog. So when you do a search for a dataset of a particular hlq the system finds the alias in the Mastercatalog and directs the search to the related Usercatalog where it will find the dataset name based on it's key, i.e. its full name. That in turn points to the volume/disk/tape it resides on, and the system then goes to that volume based on it's associated UCB (Unit Control Block), in the case of a DASD file. It then searches the volumes VTOC (volume table of contents) to find what track/cyl/head location the file is on the volume, and can then open the file or just return you information on the file that is stored in the VTOC and/or Usercatalog, depending on what you're asking for. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
The names and generation/version are stored in the same place the 'normal' dataset names are stored: the system catalog.
If you want to get listings of the catalog in batch, use a utility called IDCAMS.
When you use just the GDG base name in JCL, 'the system' goes to the catalog and grabs all of the current members of the group and presents them to that DD (from newest to oldest). |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
The catalog is a vsam dataset, is it not ? |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I have no idea. I never would access it directly. Even I'm not that crazy, and I'm pretty crazy. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Yes, the IDCAMS DEFINE USERCAT command defines user catalogs. However, they are very special VSAM files (you cannot specify RECORDSIZE for example). |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
You need to know what you're doing with Usercatalogs (and Mastercatalogs). I have had some serious stress doing maintenance on them over the decades.
They are just a VSAM KSDS but they are different in that they have their own self-describing record whereas a file within a catalog has a record relating it to the usercatalog it is in. They are also just a part of the BCS (Base Catalog Structure) which includes the VVDS's on volumes where any datasets cataloged in the Usercatalog reside. The VVDS has a backward pointer to any Usercatalog that has datasets on the volume the VVDS is on called a VVCR. It has some duplication of some of the data in the usercatalog such as SMS classes, and things like the format of files. This means you can rebuild catalog information from the VVDS if the file becomes uncataloged but still physically exists. (rarely happens but sometimes does, say perhaps after a full volume restore for example)
When you define a Usercatalog it is cataloged into the Mastercatalog that is active only on the LPAR where you define it. For other LPAR's in the same Sysplex you have to check which Mastercatalog is active and IMPORT CONNECT your Usercatalog to those other Mastercatalogs. Usually you connect it to any existing Mastercatalogs that are out there just to be on the safe side. You can see what Mastercatalog is active on an LPAR by doing a LISTCAT ENT(yourhlq) ALL.
After that the catalog will sit there and do absolutely nothing unless you define an ALIAS and RELATE it to that Usercatalog (again, the alias needs to be defined in all Mastercatalogs). The ALIAS is just that, another name for the Usercatalog where datasets will be cataloged. Usually just the first part of the name, e.g. XXX.YY.ZZ the alias might be XXX. The system receives a request to find or create a dataset name with XXX hlq, goes to the Mastercatalog and finds a pointer to the Usercatalog you have related that alias to and goes and finds or creates the records in that catalog, with the record key being the dsname. That in turn points to the volume the file is on, and the UCB the volume is on...and so on, as desribed earlier. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
sorry guys,
only meant to say that a catalog is basically a vsam.
the original question was are gdg's maintained in a vsam file.
since a catalog is a vsam, then the short answer,
without explaining how the op-sys works
is yes.
but, that is not really what the TS was asking,
nor is it really a correct answer to what I think the TS was asking.
as Pete said, (paraphrased) stay the hell out of catelogs. |
|
Back to top |
|
|
|