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



Bob Cozzi wrote:
> Han's, would the old output from calls to QtmhWrStout (in RPG IV)still
> be there if you called that program?
> Also, could we just do this?
>
>  D GetChar      PR     10u0   Extproc('getchar')
>
>  C          CallB 'QtmhWrStout' .... Blah, blah, blah
>
>  C* end of program.
>  C          CallP  GetChar()
>
> And get the same result?

Apparently not.  It would appear that the stream written to by
QtmhWrStout() is not the same as the stdout written out by C.  The
program I posted simply displays the Stdout session and waits for
user input before exiting.  Off-hand, I'm not sure if there's an
easy way to see the QtmhWrStout stream from the terminal.  (Hmmm,
that's got to play havoc with porting CGI scripts in other
languages, like Perl, to the iSeries!)

The corresponding program in RPG to display the Stdout session would
look something like this:
-----------------------------------------------------
H dftactgrp(*no) bnddir('QC2LE')
D putchar         pr            10i 0 extproc('putchar')
D   char                        10i 0 value
D getchar         pr            10i 0 extproc('getchar')
  /free
     putchar(x'0d');
     getchar();
     *inlr = *on;
  /end-free
-----------------------------------------------------

Cheers!  Hans





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.