in reply to Reading file contents

It would help to clarify for us the following: Does the decision path ever make it to the first portion of read code? If it does, we would want to figure out why the file isn't being read. But if it does not, we would want to find out why the file is failing to open for reading.

Also, you said you can write to the file but not read from it. Have you verified that the file has been written to? Once it's been written to, does your second sysopen(....O_RDONLY) die? Help us to understand where the problem is occurring. It's possible that once you've made that determination for us, you will spot the problem yourself anyway. :)


Dave

Replies are listed 'Best First'.
Re^2: Reading file contents
by Dramton (Initiate) on Jul 04, 2011 at 17:48 UTC
    No messages were ever displayed from any of the 'die' parts, meaning the file was successfully opened each time. I verified the file was successfully writen to by opening it with Notepad and see the data there. I had inserted descriptive output before and after the sysopen statements and it showed the file being open and written to everytime. For some reason the file could be opened for reading/writing but when opened for reading it could't see/read the data.