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: 8631
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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts How to change the logon screen info o... sakthikumarT TSO/ISPF 4 Fri Dec 29, 2017 6:44 pm
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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