is there an equivalent on the iseries to the GDG file structure on the mainframe?

rociseries
rociseries used Ask the Experts™
on
I want to create a file backup that has multiple archives on the iseries similar to the Generation Data Groups on the IBM mainframe side.  is that possible?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gary PattersonVP Technology / Senior Consultant

Commented:
I'm not very familiar with GDG's (I just read a high-level description, and I get the basic idea, I think).  As far as I can tell, there is not a direct equivalent on the AS/400.  Maybe another expert is more familiar with the topic

Maybe if you describe your functional requirements, we can come up with a functional equivalent, or something that will work for you.

- Gary Patterson
Hi rociseries,

Yes, if you can explain us what your looking for, it might help.

By the way, here is something very general in IBM stuff, it might help you to start...
http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zconcepts/zconcepts_175.htm

Lewis

Author

Commented:
I am trying to create multiple versions of a daily file without having to physically change the file name daily.  This process should allow me to perform automated backups on a daily basis without operator intervention and allow me to access a prior day's records easily.  
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

rociseries:

Yes and no.

There is no concept equivalent to GDGs, mostly because there should be no need for them if apps are properly designed.

However, it is possible to kind of emulate them via manipulation of "members".

This requires some care, along with an understanding of how members are organized. But it can be done.

For example, a current 'generation' might be considered as being the member that may be accessed with the generic name "*LAST". Creation of a new 'generation' might be thought of similar to adding a new member with the ADDPFM (Add Physical File Member) command. Discarding an obsolete 'generation' might be handled with RMVM (Remove Member).

Fairly simple procedures could be written once to return member names for generation - 1, generation - 2 or any desired generation, as well as for almost any generation operation needed. Such procs would be trivial to generalize for all tables on the system.

However, alternatives exist that might be better suited for many purposes.

Having a column for Generation_ID in tables might serve in a relational database much better than any GDG (or a simple GDS) ever would.

Regardless, as has been noted, the "business need" would help in determining a useful alternative for you. Can you describe a specific way to would expect implement one as well as provide the reason?

When I last used them, the reason was often for support of batch processes that sometimes needed to be backed out due to errors. Generation + 1 would be partially created and need to be destroyed. A return to generation 0 would effectively return the database to its state before the batch process ran.

Historical copies were another common reason for them. Generation 0 might represent current year, generation - 1 might be last year, and so on. Setting a limit on generations would cause the system automatically to purge the oldest generation when a new generation exceeded the limit.

But you might have other reasons in mind. Alternatives might work.

Tom
Gary PattersonVP Technology / Senior Consultant

Commented:
Why not just create a series of libraries?  If you want to keep a week's worth of files online, then just create libraries MON TUE WED .. SUN, and each day at cut-off time, move the file into the proper library, replacing any existing file.

If you need to access a specific day's data (TUE, for example) using your applications, all you would then need to do is ADDLIBLE TUE *FIRST to your library list, and the TUE file would get used.

Of course, testing will be required, since applications may make qualified references to specific libraries, or alter the library list themselves.

- Gary Patterson
rociseries:

I didn't see your previous response before my last post was submitted. Gary's response seems completely reasonable.

Keep in mind that the control language (CL) is in fact a programming language that results in compiled program objects or compiled modules that may even be bound with modules from other languages to create programs. The impact of that single idea can make a huge difference in everything you do to automate system procedures.

Since your library names or file names or just about anything else can be _variable_ values, changing names on the fly is extremely powerful. You can retrieve the name of the day-of-week and simply use that as your library name (or file name or...).

Or you could even write a REXX procedure... interpreted, though, so naturally slower than compiled programs.

Tom

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial