Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Change Record length

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
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

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

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
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
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: 8593
Location: Back in jolly old England

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: 215
Location: India

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
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us