Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
change record length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM
Author Message
Sharad Kumar

New User


Joined: 16 Oct 2007
Posts: 3
Location: Hyderabad,India

PostPosted: Sun Aug 03, 2008 6:36 pm    Post subject: change record length
Reply with quote

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

Senior Member


Joined: 18 Jul 2007
Posts: 1199
Location: At my desk

PostPosted: Sun Aug 03, 2008 6:52 pm    Post subject: Re: change record length
Reply with quote

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
View user's profile Send private message
Moved: Sun Aug 03, 2008 7:37 pm by superk From JCL to SMS & VSAM
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2241
Location: Mumbai, India

PostPosted: Mon Aug 04, 2008 11:21 am    Post subject: Re: change record length
Reply with quote

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

New User


Joined: 20 Jun 2008
Posts: 21
Location: chennai

PostPosted: Mon Aug 04, 2008 4:15 pm    Post subject: Reply to: change record length
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 3564
Location: Brussels once more ...

PostPosted: Mon Aug 04, 2008 4:46 pm    Post subject:
Reply with quote

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 icon_lol.gif
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 197
Location: At my Desk

PostPosted: Mon Aug 04, 2008 5:03 pm    Post subject: Re: Reply to: change record length
Reply with quote

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

New User


Joined: 20 Jun 2008
Posts: 21
Location: chennai

PostPosted: Mon Aug 04, 2008 5:32 pm    Post subject: Re: Reply to: change record length
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM All times are GMT + 6 Hours
Page 1 of 1