I have got this module A which is being called several times from other modules.So, for the first call to module A , it will open a file B and read a particular record but it will not close the file till the final call is made.But for the second call , i am getting a file status 47 on reading the record since the file is already opened . Please suggest something to resolve this file status and i can read the file without closing or opening the file again.
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
Well, that's your interpretaion of the problem. File-status 47 says, the execution of a READ statement was attempted on a file not open in the input or I-O mode. While you say file was never closed!
How do you make sure that file was not closed is another question altogther. Some one is lying - programmer or the file-status... file-status has been friendly since quite long so I'll stand for it. Suggest you explain little more about module A and what you want to achieve, some one will be around.