|
4. RE: Redirection control (Scott Klement)
Now the question is becoming more academic. Are there programmatic ways to control redirection? No need to pipe the results into RPG; I just want to control the output location. From what I've seen, the answer is currently "No, except for OVRPRTF for STDOUT and similar." Simply grasping for straws. Ya' never know.
Perhaps you could use spawn() with the QIBM_USE_DESCRIPTOR_STDIO variable set? I haven't tried it, but from the documentation, it appears that you could open up descriptors 0,1,2 with open(), and then spawn your C program, telling it to use those descriptors...
It looks like you could even use pipe() (instead of open()) to pipe the C program's output back to your RPG program.
Pretty cool, I should experiment with those...
-- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertech.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.