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
 

 

writing to sequential file open in i-o mode

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

New User


Joined: 18 Jan 2006
Posts: 11

PostPosted: Thu Jan 19, 2006 5:01 pm    Post subject: writing to sequential file open in i-o mode
Reply with quote

hi guys,

how can i write to a sequential file open in I-O MODE?
i've got an error 148, wrong open mode or access mode for write...

thanks!
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jan 19, 2006 5:09 pm    Post subject: Re: writing to sequential file open in i-o mode
Reply with quote

Quote:
i've got an error 148, wrong open mode or access mode for write...

148 doesn't seem a valid File Status Code... provide some more meaningful error message.

Regards,

Priyesh.
Back to top
View user's profile Send private message
obner

New User


Joined: 18 Jan 2006
Posts: 11

PostPosted: Thu Jan 19, 2006 5:24 pm    Post subject:
Reply with quote

file status code is 48 after issuing write statement...
Back to top
View user's profile Send private message
mad_566

New User


Joined: 02 Dec 2005
Posts: 3

PostPosted: Thu Jan 19, 2006 5:36 pm    Post subject: Re: writing to sequential file open in i-o mode
Reply with quote

what cobol are you using?

pc cobol?
Back to top
View user's profile Send private message
obner

New User


Joined: 18 Jan 2006
Posts: 11

PostPosted: Thu Jan 19, 2006 5:41 pm    Post subject:
Reply with quote

yap... it can b posible?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jan 19, 2006 5:41 pm    Post subject: Re: writing to sequential file open in i-o mode
Reply with quote

My apologies.... for misguiding earlier....

You need to REWRITE the file opened in I-O mode, rather than WRITE.

status code 48 indicates error ocuured during writing of a file opened in I-O mode.

Regards,

Priyesh.
Back to top
View user's profile Send private message
obner

New User


Joined: 18 Jan 2006
Posts: 11

PostPosted: Thu Jan 19, 2006 5:46 pm    Post subject:
Reply with quote

'ive tried the REWRITE but the return status code is 43.

thanks!
Back to top
View user's profile Send private message
mad_566

New User


Joined: 02 Dec 2005
Posts: 3

PostPosted: Thu Jan 19, 2006 5:48 pm    Post subject:
Reply with quote

You must Read the record before rewriting or deleting it in sequential mode
Back to top
View user's profile Send private message
obner

New User


Joined: 18 Jan 2006
Posts: 11

PostPosted: Thu Jan 19, 2006 5:50 pm    Post subject:
Reply with quote

ok... ill try. thanks a lot.

regards,
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Jan 19, 2006 5:52 pm    Post subject: Re: writing to sequential file open in i-o mode
Reply with quote

Error 43 shows : A READ DID NOT PRECEDE EXECUTION OF CURRENT REWRITE COMMAND

Bcz:
For a mass storage file in the sequential access mode, the last input-output statement executed for the associated file prior to the execution of a REWRITE statement was not a successfully executed READ statement. For relative and indexed files in the sequential access mode, the last input-output statement executed for the file prior to the execution of a DELETE or REWRITE statement was not a successfully executed READ statement.

So as per MAD says just perform read b4 rewrite...
Back to top
View user's profile Send private message
mad_566

New User


Joined: 02 Dec 2005
Posts: 3

PostPosted: Thu Jan 19, 2006 6:03 pm    Post subject:
Reply with quote

by any chance are you using micro focus?
Back to top
View user's profile Send private message
shashank2361

New User


Joined: 31 May 2005
Posts: 2

PostPosted: Fri Feb 24, 2006 7:43 pm    Post subject: Solve error code 46
Reply with quote

Hi
I am getting return code 46 i am not getting the reason for that. is the file should be in sorted form .
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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