|
|
| Author |
Message |
Sharad Kumar
New User
Joined: 16 Oct 2007 Posts: 3 Location: Hyderabad,India
|
|
|
|
Hi, I have a file in production name as a.b.c as flat (PS) file.Its record length is 200.I want to change from 200 to 220 its record length.I don't want to delete and recreate this file.Please tell me the best solution.
thank you in advance. |
|
| Back to top |
|
 |
References
|
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1199 Location: At my desk
|
|
|
|
| Sharad Kumar wrote: |
| I don't want to delete and recreate this file.Please tell me the best solution. |
For a fixed record length file, you can't without copying it.
A variable length file could be altered in place by changing the max record size. |
|
| Back to top |
|
 |
Moved: Sun Aug 03, 2008 7:37 pm by superk From JCL to SMS & VSAM |
Anuj D.
Global Moderator
Joined: 22 Apr 2006 Posts: 2159 Location: Phoenix, AZ
|
|
|
|
Hi,
| CICS Guy wrote: |
| A variable length file could be altered in place by changing the max record size. |
Without copying it..? Perhaps I misunderstood... |
|
| Back to top |
|
 |
sudhakar84
New User
Joined: 20 Jun 2008 Posts: 21 Location: chennai
|
|
|
|
I would suggest a trick for this.
Please copy F1 ( disp=old,del,del) to another dataset with another name F2 ( disp=new,catlg,del , lrecl=220) using the OUTREC statement OUTREC FIELDS = (1,200,20x).
Now copy the file F2 to F1 ( disp=new,catlg,del )
Hope this helps |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3509 Location: Brussels once more ...
|
|
|
|
| Quote: |
| Please copy F1 ( disp=old,del,del) to another dataset with another name F2 |
Excellent, and if there is a problem you also delete the original file  |
|
| Back to top |
|
 |
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 197 Location: At my Desk
|
|
|
|
| sudhakar84 wrote: |
I would suggest a trick for this.
Please copy F1 ( disp=old,del,del) |
As Expat said Your Original input file will be no more if any problem occurs.. |
|
| Back to top |
|
 |
sudhakar84
New User
Joined: 20 Jun 2008 Posts: 21 Location: chennai
|
|
|
|
Yes that was wrong.. My logic is to copy this to a intermediate dataset using outrec command and delete the orginal file so that we can create and copy the same data we have in the intermediate file.
| sudhakar84 wrote: |
I would suggest a trick for this.
Please copy F1 ( disp=old,del,del) to another dataset with another name F2 ( disp=new,catlg,del , lrecl=220) using the OUTREC statement OUTREC FIELDS = (1,200,20x).
Now copy the file F2 to F1 ( disp=new,catlg,del )
Hope this helps |
|
|
| Back to top |
|
 |
|
|