×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hello Hoss,
When I open the file it returns a handle gHandle =
open(%trim(fnwithdir): O_RDONLY: S_IRWXU + S_IRWXG + S_IRWXO);
This isn't the problem, but... just a note: the S_xxx flags are not
going to be used in the above example. The S_xxx flags are only used if
you specify O_CREAT. So the following code would be identical to what
you have:
gHandle = open(%trim(fnwithdir): O_RDONLY);
When I read the file gBytes is 0 Zero. gBytes = read(gHandle:
gDataPtr: gDataPtrSize);
What are gDataPtr and gDataPtrSize? How are they defined? What are
they set to?
Most commonly, an RPG program calling the read() API would look more
like this:
gBytes = read(gHandle: %addr(someVar): %size(someVar));
For certain, you can provide your own pointer and your own size variable
instead of using a preexisting RPG variable -- but please make sure you
specify valid values for them... If you set them wrong, you could very
well have the issue you're describing (that it can't read the data)
However, aside from that, I don't see anything wrong. I tried your code
(filling in the blanks as best I could) and was able to successfully
read a file from my NFS server. Granted, my NFS server is running
FreeBSD rather than Windows, but I don't see why that would matter...
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.