|
You can probably tell that I don't really know more than anyone else on this list about how these descriptors are used ... I don't know the internals of either Java or I/O. I found out about this magic incantation of opening three descriptors while investigating a customer problem, and the Java folks pointed me to this solution. I probably should have questioned it more at the time ...
Okay, I'll assume that the issue is that the job needs at least 3 descriptors open, and when they aren't open the JVM has these I/O errors.
There are a few issues with your code that I feel might not be correct, so I've come up with a different way ot handling them:
a) You use O_CREAT on /dev/null. This is supposed to be a special file, not one that you create. If it doesn't exist, it doesn't seem like creating it as a nromal stream file would be correct. So, if /dev/null doesn't exist, I've decided it's better to use a temporary stream file.
b) Rather than open 3 descriptors separately, I've just used dup() to create copies. And I only do that if needed to get a FD of 2 or higher.
If Peter, Leif, Barbara, and anyone else who has been having trouble with HSSF getting the Java I/O errors could try out the updated code, I'd appreciate the feedback. My updated routine can be found here:
http://code.midrange.com/index.php?id=d3acc174e8I'd really appreciate any feedback on whether this helps or not -- if it does, I can update the source code on iSeriesNetwork.com and announce it to all my readers.
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.