View previous topic :: View next topic
|
Author |
Message |
get2anil
New User
Joined: 15 Dec 2005 Posts: 3
|
|
|
|
Hi,
I have a job that runs weekly which takes all the generation of a dataset. I have increased the LRELC of that file. My weekly job is abending now as the generations before my changes have old LRECL and new genrations have new LRECL.
Is there a way to update all the old generations to new LRECL? Please let me know.
I tried simply copy with disp=old and new LRECL and is not working.
Regards
Anil |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
A DFSORT step would usually be used. For example, to change the old LRECL of 80 to a new LRECL of 100:
Code: |
//SORT EXEC PGM=ICEMAN
//SORTIN DD DISP=OLD,DSN=MY.GDG.G0001V00
//SORTOUT DD DISP=(,CATLG,DELETE),DSN=MY.GDG.G0001V01,...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1:1,80,100:X)
/*
|
|
|
Back to top |
|
|
ravindran1185
New User
Joined: 03 Nov 2008 Posts: 7 Location: Chennai
|
|
|
|
If I change the old LRECL of 80 to a new LRECL of 100 ...By default what data will be there in that 20 bytes???? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Using the code supplied by Kevin above, blanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Copying these "old" length files to the new length may cause you more problems than it saves. If the record format was changed throughout the record (i.e. fields made larger, fields inserted before the additional 20 bytes, etc) the "lengthened" files will be useless.
If the record change was to add new data only at the end of the record, the copy might be helpful, but whatever code runs against the "old" data needs to know that the las 20 bytes are not valid data - which may cause errors in processing or may cause 0c7 abends if the code expects numeric values.
I'd suggest you keep/create a copybook for the old format and use that format until the old files are no longer part of the system. It is probably too late, but i'd also suggest creating a new dsn/gdg for the new data format.
Depending on what changes were made to the record layout and how the "old" data is to be used should help deciding which way to proceed. |
|
Back to top |
|
|
|