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: 1074
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: 8631
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: 8218
Location: Dubuque, Iowa, 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: 1951
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: 8218
Location: Dubuque, Iowa, 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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm

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