View previous topic :: View next topic
|
Author |
Message |
Minaxi Singh
New User
Joined: 27 Sep 2013 Posts: 4 Location: UK
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Minaxi Singh
New User
Joined: 27 Sep 2013 Posts: 4 Location: UK
|
|
|
|
Cud you plz help me with sample rexx code |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Minaxi Singh
New User
Joined: 27 Sep 2013 Posts: 4 Location: UK
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Minaxi Singh
New User
Joined: 27 Sep 2013 Posts: 4 Location: UK
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 582 Location: London
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
|