IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to rewrite record in variable length sequential file?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Apr 03, 2011 4:40 pm
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: 8797
Location: Welsh Wales

PostPosted: Sun Apr 03, 2011 6:06 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Apr 03, 2011 7:08 pm
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: 2455
Location: Hampshire, UK

PostPosted: Sun Apr 03, 2011 7:28 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Apr 04, 2011 2:45 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top