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



perhaps you could simply use the C functions from stdio: I would do
something like this:

ctl-opt debug(*yes) dftactgrp(*NO) actgrp('QILE');

ctl-opt main(main);



dcl-pr printf int(10) extproc(*CWIDEN: 'printf');

format pointer value options(*string);

end-pr;



dcl-proc main;



printf( 'Hello world ' +x'25');



end-proc;


On Sun, Oct 3, 2021 at 7:19 PM Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
wrote:

Not sure if this would work for your purposes, but you can call any
Qsh/Pase/Bash script and capture stdout and then consume from RPG.

QShell on i
https://github.com/richardschoen/qshoni

Works from CL, RPG or COBOL.

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx

------------------------------

message: 2
date: Sun, 3 Oct 2021 10:37:58 +1100
from: frank kolmann <frank.kolmann@xxxxxxxxx>
subject: Re: How to use stdin/stdout/stderr from ILE RPG?

Hi Patrik

I dont have stdin/stdout/stderr but I have an RPG program that uses Unix
Apis that can open/read any file.
It is not complete because I got stuck on null capable fields. One needs a
indicator DS for the null field maps that matches the null capable fields.

On 02/10/2021 6:18 am, Patrik Schindler wrote:

Hello,

I took a while to search the net how I can use stdin/stdout/stderr from
within ILE RPG, but I failed to find something relevant.

Does anybody have some hints?

I want to implement a simple and highly specialized (for Spamassassin)
database I/O manager running from within inetd instead of SQL, which is
just too slow on my 150.

:wq! PoC


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


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.