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
 

 

change the LRECL of all the GDG

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

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Mon Apr 07, 2008 1:48 pm    Post subject: change the LRECL of all the GDG
Reply with quote

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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 07, 2008 3:44 pm    Post subject:
Reply with quote

You will have to perform copies if you want to increase the LRECL
Back to top
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Mon Apr 07, 2008 4:17 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 07, 2008 5:24 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 07, 2008 7:08 pm    Post subject:
Reply with quote

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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Apr 07, 2008 7:12 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Tue Apr 08, 2008 12:04 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Tue Apr 08, 2008 5:02 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

Hi all..

Tha coe which i had mentioned is also not working. Can any one help me in this regard.
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 Apr 08, 2008 6:01 pm    Post subject:
Reply with quote

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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 08, 2008 6:09 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Wed Apr 09, 2008 12:13 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Wed Apr 09, 2008 4:44 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Wed Apr 09, 2008 5:16 pm    Post subject: Reply to: change the lrecl of all the generations of gdg to
Reply with quote

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
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 Fail to change physical VSAM filename... jacobdng CICS 5 Fri Jan 20, 2017 12:36 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts PL/I: opening file w/ dynamically det... Sam Dodgers PL/I & Assembler 6 Wed Jul 27, 2016 4:05 pm
No new posts How to change dataset attributes of m... ignich7 JCL & VSAM 3 Thu Jul 21, 2016 9:17 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm


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