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.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
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.