Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> 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: 216
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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us