View previous topic :: View next topic
|
Author |
Message |
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi,
I have the below SYSIN card for the ADDRSSU utility to take back up of all the files with High level Qualifier HLQ1.HLQ2.
Code: |
DUMP DATASET(INC( -
HLQ1.HLQ2.**, -
) -
EXC(HLQ1.HLQ2.N.ABC, -
) -
SHR -
TOL(ENQF) WAIT(3,3) -
ALLX -
SPHERE -
OUTDD(TAPE1) -
ALLD(*) -
CAN
|
Above card takes back up of all the DASD files into a TAPE.
Now my requirement is, for the GDG versions, I want to take only the latest (0) version back up and need to exclude all the old generations. (If we have limit of 25 versions then take only 25th version back up and exclude all the 24 versions, this will save time when we run ADDRSSU daily).
Can you please advise how do we give an Generic exclude filter for the all the GDG's to exclude older versions?
Regards,
Chandra |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you can dump the latest generation like this
Code: |
DUMP -
DATASET( -
INCLUDE( -
HLQ1.XX.D*.**(0) /* CURRENT GENERATION ONLY */ -
) -
|
Gerry |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi
Thanks. This detail pretty useful for me.
But how do we avoid backing up of the all the older versions (-1),(-2) etc?.
In my case HLQ1.HLQ2.** will include all the files including the older GDG versions. I want to avoid taking back up of the older versions.
Please let me know if you have any idea for this.
Thanks
Chandra |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Dead easy, as there is only ever ONE version of a GDS, so you will always be dumping only the latest version.
Now, if you are talking about generations, that would be a different matter.
Terminology is so very important in the IT world, so please get it right. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Just to expand on expat's answer...
The version number is the number that comes after the V in the generation number part of the DSN. This is usually 00 and you would normally only have this version of a file. |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
I agree Terminology is so very important in the IT world. I Missed the correct terminology.
Now coming back to the above question again, How do we avoid backing up of the all the older GDG generations (-1),(-2) etc in ADDRSSU?. Please provide some inputs.
Regards,
Chandra |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
So Gerry's solution didnt work? |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi,
It wil work to only to dump the latest GDG generations.
In my qualifier HLQ1.HLQ2.**, there are sequential files(other than GDG Generations) as well as GDG Generations.
Ex. If I have below files with qualifier HLQ1.HLQ2.**
HLQ1.HLQ2.A
HLQ1.HLQ2.AB
HLQ1.HLQ2.ABC
HLQ1.HLQ2.ABCD <<<<< GDG base
HLQ1.HLQ2.ABCD.G3562V00
HLQ1.HLQ2.ABCD.G3563V00
HLQ1.HLQ2.ABCD.G3564V00
HLQ1.HLQ2.ABCDE <<<<< GDG base
HLQ1.HLQ2.ABCDE.G3562V00
HLQ1.HLQ2.ABCDE.G3563V00
I need back up of only below files need to be backed up.
HLQ1.HLQ2.A
HLQ1.HLQ2.AB
HLQ1.HLQ2.ABC
HLQ1.HLQ2.ABCD.G3564V00
HLQ1.HLQ2.ABCDE.G3563V00
Regards,
Chandra |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
I would suggest that if you have datsets such as:
HLQ1.HLQ2.SOME.NAME
HLQ1.HLQ2.SOME.GDG.G0002V00
HLQ1.HLQ2.SOME.GDG.G0001V00
using HLQ1.HLQ2.* will pick up ALL datasets. Just because you are specifying HLQ1.HLQ2.**(0) in another selection criteria woould not magically exclude it from the first criteria. Could be wrong as products evolve over the years.
If my suggestion is right then there are a number of options including:
1 - refine your criteria
2 - use a different naming convention for GDGs
3 - write a program to generate the criteria from a LISTC listing.
While I was writing the above TS made a new post. Another option is to exclude HLQ1.HLQ2.ABCD.* and then INCLUDE HLQ1.HLQ2.ABCD(0) |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Thanks Nic.
In the production environment we have the many datasets(more than 50,000) with to same high qualifiers. To combine all of them in a single job was the intention but bit hard now to exclude using the generic filter.
ex.
HLQ1.HLQ2.SOME.NAME
HLQ1.HLQ2.T1111.NAME
HLQ1.HLQ2.R2BAB.ABC.**
HLQ1.HLQ2.YADC.BCD.**
HLQ1.HLQ2.ZDCA.RTB.** and so on......
As you said the option 3 might be better suit here. I will look at some routine to extract the generic filter and post if find any.
Regards,
Chandra |
|
Back to top |
|
|
chandraBE
New User
Joined: 02 Feb 2010 Posts: 44 Location: Bangalore
|
|
|
|
Hi,
For the above query I have decided to go with two jobs.
1. Take back up of the files excluding the GDG Generations
2. Take last GDG generation back up.
I have used below Exclude condition to exclude GDG generations from backing up.
In our system we dont have any Generation data set with name HLQ1.**.G*V00.
And as suggested used below SYSIN to Dump the last GDG generation.
Code: |
DUMP -
DATASET( -
INCLUDE( -
HLQ1.XX.D*.**(0) /* CURRENT GENERATION ONLY */ -
)
|
Thanks everyone who helped me on this.
Regards,
Chandra |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 590 Location: London
|
|
|
|
You can exclude or include all generations of GDG's by coding for example, HLQ1.**(*)
You can also still dump both sets of data in the same job by having two DUMP statements referencing two different output DD's. And they can run at the same time if you specify the PARALLEL parameter, although it will need a large region size for the job. |
|
Back to top |
|
|
|