|
Scott: The C program is outside of my control; i.e., I'm only allowed to call it, I cannot change it. I will call the C program from RPG and it outputs to STDOUT. After returning to RPG, I will run through the output to STDOUT to see if anything else needs to be done. For reasons that are also outside of my control, QShell is a strong "last-resort only"; so I'm looking for redirection alternatives. Since QShell can redirect so easily, it's frustrating that there's no other clear method except for OVRxxxx. Technically, if QShell can do it, I should be able to do it too. (...he said optimistically.) Archive searches showed that STDOUT could be overridden as a printer file. And Steve Landess reminded me that printer files can be overridden to database files which is something I quit doing long enough ago that I'd nearly forgotten was possible. Although a more pure redirection to a streamfile would be cleanest for my needs, going through a PF is reasonable. 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. Tom Liotta rpg400-l-request@xxxxxxxxxxxx wrote: > 8. Re: Redirection control (Scott Klement) > >> Is there any useful way to control redirection from within RPG? While a >> spooled file "works", I'd much prefer going direct to a streamfile or >> any similar facility. Reading a spooled file isn't out of the question; >> it's just ugly and prone to future trouble. > >I'm not sure what you're asking? You're writing an RPG program which >outputs to stdout, and you want to know how to redirect it in QShell? >It's done exactly the same way as redirecting anything else in QShell. >The shell doesn't know that it's an RPG program -- it just knows that the >data on descriptor 1 is stdout, and that it should be redirected... > >Or, are you saying that you want the output of the C program to be piped >to the input of the RPG program, and you don't know how to read stdin? > >I guess I don't understand what the diff between QShell from RPG and >QShell from C is, aside from the fact that 99% of the C programmers are >familiar with Unix-style shells and only 1% of the RPG programmers are. -- 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 __________________________________________________________________ New! Unlimited Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register Act now to get a personalized email address! Netscape. Just the Net You Need.
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.