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
 

 

File write status 44

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

New User


Joined: 20 Dec 2006
Posts: 55
Location: noida

PostPosted: Wed Jul 10, 2013 10:20 am    Post subject: File write status 44
Reply with quote

Hi,

I have an existing variable block sequential file which has a record length of 300 bytes.
Earlier only 200 bytes of data was being written to the file. Now I am updating this file and i am adding additional 100 bytes i.e. now i am using the complete 300 bytes.

When I am issuing the rewrite statement, it gives 44.


FD -
BLOCK CONTAINS 0 CHARACTERS
RECORD IS VARYING IN SIZE
LABEL RECORDS STANDARD.
file-rec pic x(300).


Any idea what needs to be done to resolve this issue?

Thanks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Wed Jul 10, 2013 11:31 am    Post subject: Reply to: FIle write status 44
Reply with quote

If you look at one of the "stickies" in the COBOL forum you'll find an explanation of the file-status codes. A 44 is:

Quote:
A boundary violation exists because an attempt was made to rewrite a record to a file and the record was not the same size as the record being replaced, or an attempt was made to write or rewrite a record that was larger than the largest or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file-name.


Note, all that an LRECL of 300 says for a dataset is that the maximum length a record can be is 300 bytes (296 bytes of data and four bytes of "control information", the RDW).

You read your existing 200 byte-record (which actually has 204 bytes) and then you try to REWRITE it as 300 bytes (actually 304). Before the 304 can cause you a problem (if it were going to, there is room for mis-description in what you have said) the system carefully notes that you are trying to REWRITE a different length from the record that you READ.

To many, including me, it is a bad idea to update sequential datasets. Much better to just read, and then output a new dataset. Simplifies the JCL, simplifies the COBOL program, and you never get this situation, where you find only at this point that you didn't know enough about how it operates to realise that your file nedded "conversion" to the new-sized records.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jul 10, 2013 7:40 pm    Post subject:
Reply with quote

Hello,

Not only is updating a sequential file problematic, it is banned in every organization i've supported.

It is one of those "things" you can do, but should not do . . .
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 RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
This topic is locked: you cannot edit posts or make replies. session stuck in TPX with status ACL amitc23 CA Products 1 Tue Dec 13, 2016 12:53 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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