Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Concatinating GDS to an output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ravikumar15

New User


Joined: 27 Mar 2006
Posts: 64

PostPosted: Mon May 28, 2007 6:15 pm    Post subject: Concatinating GDS to an output file
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 28, 2007 6:23 pm    Post subject:
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: 64

PostPosted: Mon May 28, 2007 6:34 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 28, 2007 6:40 pm    Post subject:
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: 64

PostPosted: Mon May 28, 2007 7:09 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 28, 2007 9:39 pm    Post subject:
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

Site Director


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

PostPosted: Mon May 28, 2007 9:54 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 28, 2007 9:57 pm    Post subject:
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: 64

PostPosted: Mon May 28, 2007 11:56 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Tue May 29, 2007 12:15 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue May 29, 2007 1:51 am    Post subject:
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: 64

PostPosted: Tue May 29, 2007 5:30 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue May 29, 2007 5:58 pm    Post subject:
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: 64

PostPosted: Tue May 29, 2007 6:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us