× 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.



rpg400-l-request@xxxxxxxxxxxx wrote:

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...

Ya' know, put together with the VT APIs, Qp0zStartTerminal() might have some intriguing qualities. When STDOUT is sent to the terminal, an [Enter] key is required to end the session. OVRPRTF STDOUT to a DBF has no such restriction.


I haven't used pipe() but looked at it before posting. I didn't see an obvious way to "tell it (the sacrosanct C program) to use those descriptors", hence, the post.

For now, I guess it just has to wait. File output 'works'.

Tom Liotta

--
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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.