IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Concatinating GDS to an output file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Mon May 28, 2007 6:15 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon May 28, 2007 6:23 pm
Reply with quote

What logic will you use to determine if a version is to be included in the concatenation ?
Back to top
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Mon May 28, 2007 6:34 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon May 28, 2007 6:40 pm
Reply with quote

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
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Mon May 28, 2007 7:09 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon May 28, 2007 9:39 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Mon May 28, 2007 9:54 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon May 28, 2007 9:57 pm
Reply with quote

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
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Mon May 28, 2007 11:56 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue May 29, 2007 12:15 am
Reply with quote

Sounds like an echo........
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue May 29, 2007 1:51 am
Reply with quote

Sounds like an echo........
Back to top
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Tue May 29, 2007 5:30 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue May 29, 2007 5:58 pm
Reply with quote

Looks good to me.

Just make sure that PQR.CONTROL is defined as MOD in the JCL.
Back to top
View user's profile Send private message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 68

PostPosted: Tue May 29, 2007 6:10 pm
Reply with quote

yep, I have given as MOD.

Thanks very much for ur solutions. It helped me in coming with this solution.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts how to eliminate null indicator value... DB2 7
Search our Forums:

Back to Top