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
 
How to rewrite record in variable length sequential file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
deepali33

New User


Joined: 21 Sep 2008
Posts: 4
Location: pune

PostPosted: Sun Apr 03, 2011 11:54 am    Post subject: How to rewrite record in variable length sequential file?
Reply with quote

Hi,

I have one sequential file with variable length.
I want to update that file.
So I am using rewrite statement.
But at the time of execution it is giving abend.
& there is file error at rewrite statement i.e. file status is 44.
44 : Rewrite attempt with invalid length.
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1059
Location: Oostende, Belgium

PostPosted: Sun Apr 03, 2011 4:40 pm    Post subject:
Reply with quote

And what is your problem?
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: Sun Apr 03, 2011 6:06 pm    Post subject:
Reply with quote

Well, with so much information at hand it's so very hard to know where to start.

What is the DSORG of the file.
Are you writing longer than the original record.
DCB attributes of the file.
File is on which media.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sun Apr 03, 2011 7:08 pm    Post subject:
Reply with quote

Not to mention -- which abend code did you get?

You basically tell us nothing and expect us to psychically read your mind to know these details?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Sun Apr 03, 2011 7:28 pm    Post subject:
Reply with quote

Remember - if you are to rewrite a record it must be of the same length as the original record as it has to fit in the same space as it was read from.
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Mon Apr 04, 2011 2:15 pm    Post subject:
Reply with quote

can you please provide the FD section of that file and the copybooks / record lengths that are used for that file along with the record length which you are trying to rewrite while getting abend.
( I guess there must be 2-3 different kind of records are getting written in th same file that make it varuable length.)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Apr 04, 2011 2:45 pm    Post subject:
Reply with quote

Quote:
(I guess there must be 2-3 different kind of records are getting written in th same file that make it varuable length.)
Or it could be an OCCURS DEPENDING ON -- the other way of creating variable length records.
Back to top
View user's profile Send private message
kapiltamrakar

New User


Joined: 24 May 2009
Posts: 41
Location: Hyderabad

PostPosted: Mon Apr 04, 2011 2:53 pm    Post subject:
Reply with quote

Hi Robert,
well said... icon_smile.gif thanks for adding point missed by me... icon_smile.gif

Regards,
Kapil.
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 -> COBOL Programming 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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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