Highlighted
Absent Member.
Absent Member.
1131 views

open an rm file for writing from mf

Jump to solution

I have a mf cobol program that reads items from an indexed rm file. The filetype is set to 21. trying to open a file for output gives a file status error of 93. 

Reading the file works find but opening for output gives a 21. 

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: open an rm file for writing from mf

Jump to solution

It sounds to me like the file isn't being closed after the original open input which would cause the open output to fail. Please trace through your code and make sure that the close statement for that file is being done properly. Since open output requires exclusive access to the file the file cannot be open by the same or any other process at the time the open output occurs.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: open an rm file for writing from mf

Jump to solution

I thought of that and ran through the code a few times. The close is being called. Oddly enough it is working now....

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: open an rm file for writing from mf

Jump to solution

Hello,

I can do an open output without an issue with filetype(21) from an MF COBOL program. I am running Visual COBOL 2.3 Update 1. What version are you running?

Regards,

–Ғɑɳօ
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: open an rm file for writing from mf

Jump to solution

I am running version Micro Focus Visual COBOL 2.3 Version 2.3.02187.

If I use a different file, I can write to the file however I am opening (and closing) a file for input in one procedure then opening for output in another procedure. That is where the status 93 occurs.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: open an rm file for writing from mf

Jump to solution

It sounds to me like the file isn't being closed after the original open input which would cause the open output to fail. Please trace through your code and make sure that the close statement for that file is being done properly. Since open output requires exclusive access to the file the file cannot be open by the same or any other process at the time the open output occurs.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: open an rm file for writing from mf

Jump to solution

I thought of that and ran through the code a few times. The close is being called. Oddly enough it is working now....

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.