View previous topic :: View next topic
|
Author |
Message |
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
i have many gdg's. The generaions may be of lrecl 100 or 500.
i want to uniformaly change the lrecl of each of the generations to 500.
if the above cant e done:
i would want to copy a gdg to other gdg where the output gdg also has similar number of generations but all the generations have lrecl=500.
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You will have to perform copies if you want to increase the LRECL |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Thanks a lot.
But for performing that i will have to give each and every generations manually in the jcl.
Is there any way where we can give just the gdg base file as input which has generation datasets with lrecl 100 and lrecl 500 also.
and in output we will give a gdg base file alone (which initially has no generaions) and after the copy is performed has the same number of generations as in input but will all lrecl=500. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
By using the GDG base name you will concatenate all existing generations into one output, so NO.
Why do you need to do this ? If a program has changed, then changing old data formats doesn't really achieve anything as that data has already been processed.
Also I assume that these files are FB rather than VB |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I would suggest a REXX to find all generations of a given GDG base, and then extract the generations and use LISTDSI to get the attributes of each generation.
There are examples of this on the forum. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
If there are existing generations that already have the LRECL of 500, shouldn't you exclude those from the process?
Then, all you need to do is to copy each of the generations where the LRECL is short, using DFSORT/SYNCSORT to pad the records out to 500, while keeping the order of the generations intact.
For example, if the GDG HLQ.MYGDG.G0010V00 has the short records, then you would copy HLQ.MYGDG.G0010V00 to HLQ.MYGDG.G0010V01, effectively replacing the old generation with the updated one.
Yes, you're going to have to write some code or perform some editing of the dataset listing. |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Thanks a lot for responses.
As mentioned copying will be the best option (using sort).
1st i will have to identify list of generations with lrecl=100 in a gdg and take those as input to below jcl.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1..generation (FB-100)
//*** Use a MOD data set for //OUT
//OUT DD DISP=MOD,DSN=... output file..... (FB/500)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
INREC OVERLAY=(500:X)
|
in above can i use the input file corresponding to dd name IN1 as output corresponding to dd name OUT with disp=(mod,catlg,catlg). and lrecl=500???
I came to know about the code in one of the quieries. Also please suggest if this will really work.
Thanks |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Hi all..
Tha coe which i had mentioned is also not working. Can any one help me in this regard. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Try
Code: |
//TOOLIN DD *
COPY FROM(COPYIN) TO(COPYOUT) USING(COPY)
//COPYCNTL DD *
SORT FIELDS=COPY
OUTFIL OUTREC=(1,100,500:X)
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
This is what I was thinking of:
Code: |
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=HLQ.MY.GDG.G000XV00,DISP=SHR
//SORTOUT DD DSN=HLQ.MY.GDG.G000XV01,
// DISP=(,CATLG,DELETE),UNIT=SYSDA
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(500:X)
/*
|
|
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Thanks all..i am glad to see some many responses.
All the code works fine. But can any one tell me the best way for the below:
1. Changing length of generations of gdg from 100 to 500
a) one way is to identify generations with lrecl 100 (LISTDS cmd) and prepare a jcl using the sort cards given by you all. Since number of generations will be very high and also there are several gdg's, the number of steps in jcl will also be huge. This seems to be lengthy procedure.
b) I searched for adrdssu utility. Using this we can take copy generation to generation. Output gdg will have similar number of generations as in input.
But question remains - How to change the lrecl in the new generaions. Can it be done while copying?.. If this can be then most of the manual work can be eliminated.
c) - Using (b) take a back up copy of each of gdg's.
- Then deleting the original gdg's (which were used as input to get
back up copy.
- use the backed up generation as input to icetool to get original
generation with lrecl=500.
The second method i.e. (b) seems to be shortest route to end result. Can any one throw light on the same.
Thanks |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Hi...all, As mentioned in my previous post..
see point (b) --"generation to generation copy" using ADRDSSU.
Find below the code i have almost got the same. I am also able to get the output gdg with lrecl=500 and having same number of generations as in input.
//CREATE EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEF GDG (NAME(gdg.out) LIMIT(31) NEMP SCR)
/*
//MOD EXEC PGM=IEFBR14
//MODEL DD DSN=gdg.out(+1),
// DCB=(LRECL=500,RECFM=FB,BLKSIZE=0),
// DISP=(MOD,KEEP),
// SPACE=(TRK,(0,0))
//************************
//STEP1 EXEC PGM=ADRDSSU
//SYSUDUMP DD SYSOUT=*,DCB=MDCB.OLP
//SYSPRINT DD SYSOUT=*,DCB=MDCB.OLP
//SYSIN DD *
COPY -
DATASET( -
INCLUDE( -
gdg.in.** - ............input gdg
) -
) -
TOL(ENQF) -
RENUNC(gdg.in.**, - ..............input gdg
gdg.out.**) - ........output gdg
CATALOG TGTGDS(ACTIVE)
/*
But...
Except the first generation of the output the rest of the generations are getting copied properly. The first generation of the output always remains empty.
Which should be the case as the 1st generation of the input is non-empty.
I guess, it is because of the MOD step (IEFBR14) where i am mentioning a model generation with lrecl=500.
Suggest me a way out of this. |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Actually only the 1st generation is getting created with lrecl=500 and rest are with 100.
Apologize for posting the code in hurry!!!
still the problem is not solved.
one thing is sure ... generation to generation copy can be taken.
But what should be done to change the lrecl??? |
|
Back to top |
|
|
|