View previous topic :: View next topic
|
Author |
Message |
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
Hi,
There are 'n' no of gdgs . We need to concatinate 'n' gdgs to a single output file. We dont want to concatinate all the versions of the gdg. We are thinking to use repro to concatinate. I want to know whether can we use multiple files in the repro command as input datasets.
Ex: REPRO IDS(ABC.PQR.XYZ0005V00 ABC.PQR.XYZ0006V00 ABC.PQR.XYZ0010V00 ABC.PQR.XYZ0012V00)
ODS(RST.OUTPUT.DATA)
If this is not possible, please let me know is there any better way to do it.
We cant use the DD concatination as we dont know the version name. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What logic will you use to determine if a version is to be included in the concatenation ? |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
We will get the version nos using FILEAID utility. We will put all the gdg names in one control card. I am planning to read this control card and using FILEAID prepare another control card with the REPRO command and in the next step use this control card for merging. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I think you will need multiple REPRO statements, but as long as the output is defined as DISP=MOD it should work OK. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
we can give the gdg names in the DSN of proc or job as we will not be knowing the version nos. So we will prepare a control card using fileaid with the gdg names and then try to concatinate the gdg.
Note: The no of gdg's to be concatinated may vary.
Ex: It can be 6 gdgs, or even it may be only one gdg. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
As stated above, I believe that you will need one REPRO statement for each file, and if the output file is DISP=MOD it will work. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Is there some particular reason to use REPRO? I believe IEBGENER or SORT will perform better and you could run either in one step regardless of whether you have one or several input generations.
Within File-Aid, how will the generations be selected? Why would the 3rd 7th and 9th generations be selected and not the others? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Dick,
I did think the same, but as the OP was talking about this all hanging in one job, then REPRO will be better because you can use control statements to select the input datasets rather than JCL which would then have to be processed under a different job. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I am using File aid to get the gdg names which have not been processed. So I want to process those gdg's in the next step. for that I am using File aid and getting the gdg names in a file. Using that file, i have to copy all the gdg's which have not been processed to a flat file and then process the flat file.
And about 3rd, 7th and 9th, I just gave example. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Sounds like an echo........ |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Sounds like an echo........ |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
I got the solution for this.Here is the solution for this
Suppose if the gdg versions re like this,
ABC.DEF.XYZ.G0001V00
ABC.DEF.XYZ.G0002V00
ABC.DEF.XYZ.G0003V00
I am using file aid to capture the gdg names and put in one file say, PQR.CONTROL
In the next step, i am using file aid step to create a control card for repro statement.
the file aid control card should look like this,
$$DD01 USER OUT=0,
IF=(1,EQ,C'ABC.DEF.XYZ'),
MOVE=(1,80C' '),
MOVE=(1,C" REPRO IDS( ) -"),
MOVE=(30,C" -"),
MOVE=(13,24,1),
WRITE=(DD01O),
MOVE=(1,80C' '),
MOVE=(1,C' OFILE(TSTFILOT)'),
WRITE=(DD01O)
In this I am reading the PQR.CONTROL which contains the gdg names. So it searches the gdg name and if its there then it moves the REPRO IDS(gdgname with verson) and ofile(ddname)
So the output file of this step will have
REPRO IDS(ABC.DEF.XYZ.G0001V00)-
OFILE(TSTFILOT)
REPRO IDS(ABC.DEF.XYZ.G0002V00)-
OFILE(TSTFILOT)
REPRO IDS(ABC.DEF.XYZ.G0002V00)-
OFILE(TSTFILOT)
In the next step I will use IDCAMS with the above control card so that the GDG's are repro'ed to the file mentioned in the dd name.
Please let me know is there any better solution for this. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Looks good to me.
Just make sure that PQR.CONTROL is defined as MOD in the JCL. |
|
Back to top |
|
|
ravikumar15
New User
Joined: 27 Mar 2006 Posts: 68
|
|
|
|
yep, I have given as MOD.
Thanks very much for ur solutions. It helped me in coming with this solution. |
|
Back to top |
|
|
|