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
 

 

Copy all the generations of GDG1 to a new GDG2

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

New User


Joined: 27 Sep 2013
Posts: 4
Location: UK

PostPosted: Mon Oct 14, 2013 9:05 pm    Post subject: Copy all the generations of GDG1 to a new GDG2
Reply with quote

I need to copy all the generations of GDG(LRECL=1500) to new GDG with increased LRECL of 2500.
I am using below Sort card and it works fine
Code:
//SYSIN    DD  *                                                       
 SORT FIELDS=COPY                         COPY SORT COMMAND           
 OUTREC FIELDS=(1:1,1500,                 REFORMAT OUTPUT RECORD ADDING
             1501:1000X)                       1000 BYTES OF SPACES   
/*       



But to repeat the same process everytime for all the generations is a tidious job.
I need to automate it.
1. Did a listcat for the desired nodes and formated the listcat output with ezt. Now I have a dataset with all the gdg generations which needs to be changed.
2. Created base with new DSN and now just need to copy all the generations from old dsn to the new DSN.

Cud you plz help if I can automate it to read gdg gene

Input - XXXX.ABC207M.IDCAMS.XX.AK.YE
Desired output (with all the generation copied and increased LRECL)-XXXX.ABC156G.IDCAMS.XX.AK.YE

Code'd
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Oct 14, 2013 9:09 pm    Post subject:
Reply with quote

Write a little bit of Rexx or COBOL to read the input data set and fabricate JCL and *sort control cards; either use the TSO SUBMIT command (in Rexx) or write the JCL to the internal reader (in COBOL) to execute the job.
Back to top
View user's profile Send private message
Minaxi Singh

New User


Joined: 27 Sep 2013
Posts: 4
Location: UK

PostPosted: Tue Oct 15, 2013 1:50 pm    Post subject:
Reply with quote

Cud you plz help me with sample rexx code
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1713
Location: UK

PostPosted: Tue Oct 15, 2013 2:03 pm    Post subject:
Reply with quote

Do you mean: "Could you please..."?

Plenty of examples on the forum - have you searched? Or asked your colleagues? Or your local Rexx Guru?
Back to top
View user's profile Send private message
Minaxi Singh

New User


Joined: 27 Sep 2013
Posts: 4
Location: UK

PostPosted: Tue Oct 15, 2013 2:20 pm    Post subject:
Reply with quote

Nic, Even I can post relpy like you on every post. Its so simple rather than providing any help just write something weird. I think it was my mistake to ask a question here. Anyways, Thanks for nothing.
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: Tue Oct 15, 2013 6:19 pm    Post subject:
Reply with quote

Hello,

Quote:
I think it was my mistake to ask a question here.
You did not make a mistake posting a question. . .

You did make a mistake asking others to do your work for you. . .

We are here to help, not do the work.

If you post what you have tried and where you are stuck, someone may be able to offer suggestions.
Back to top
View user's profile Send private message
Minaxi Singh

New User


Joined: 27 Sep 2013
Posts: 4
Location: UK

PostPosted: Wed Oct 16, 2013 2:41 pm    Post subject:
Reply with quote

Basically I am a beginner in RExx,Just got the basic idea abt rexx from manuals.
In my Input dataset I have the list of all gdg generations to be converted into 2500 LrecL with a new name or i can have same name and just inrement version num.
I am stuck at a point how the file name will be sent to JCL. The JCL shud be called for every file from the REXX routine in a loop.
Even if i am able to pass gdg for sort in, how do i interpret the sortout gdg generation as the desired output is like this.
Input - XXXX.ABC207M.IDCAMS.XX.AK.YE.g***
Desired output (with increased LRECL)-XXXX.ABC156G.IDCAMS.XX.AK.YE .g***
2nd option is to use just version number 01 instead of 00 for the generations and in this case i can keep the same dsn name XXXX.ABC207M.IDCAMS.XX.AK.YE.g***v01
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: Wed Oct 16, 2013 4:50 pm    Post subject:
Reply with quote

You can dynamically allocate and process each of the input and output files in a loop within the batch job that you submit.

Do not use the version number solution because only ONE version of a given generation can exist, so if your copy fails you may well delete the input data for that generation.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Thu Oct 17, 2013 8:26 pm    Post subject:
Reply with quote

Read all generations in one go like this...

//INPUT DD DSN=input.gdg.base.name,DISP=SHR
//OUTPUT DD DSN=output.gdg.base.name(+1),DISP=(,CATLG)...

to create one new output generation on your new GDG
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Oct 17, 2013 8:30 pm    Post subject:
Reply with quote

I think she wants one output generation per input generation. However, that's a trivial enough thing that the hints she's been given so far should be more than adequate.
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
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts How to copy Tape dataset to unix main... chaky All Other Mainframe Topics 4 Fri Jul 08, 2016 2:52 am
No new posts Using Field names in FILEAID Batch CO... Atul Banke Compuware & Other Tools 2 Wed Jun 29, 2016 9:54 pm


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