On 2/1/2019 2:26 PM, smith5646midrange@xxxxxxxxx wrote:
Can anyone provide a sample program (or point me to one), preferably written
in RPGLE that can be run on the iSeries from a Windows 10 PuTTY session and
have it return data back to the PuTTY session? I would be OK if it just
returned "Hello World". In the real world, I will need to generate data and
return it to the caller but Hello World would get me started.

This isn't 100% what you were asking for ... but I was able to invoke the DSPLIBL command on the host using a SSH command line...

$ ssh myuser@hostname 'system dsplibl'
myuser@hostname's password:
5770SS1 V7R2M0 140418 Library List
2/01/19 15:42:56 Page 1
ASP
Library Type Device Text Description
QSYS SYS System Library
QSYS2 SYS System Library for CPI's
QHLPSYS SYS
QUSRSYS SYS System Library for Users
QSHELL PRD
QGPL USR General Purpose Library
QTEMP USR
* * * * * E N D O F L I S T I N G * * * * *
$

As an alternative, if you're willing to look at Java code, you could get the jsch library (a pure java SSH implementation) and use that to invoke commands on the host. You _should_ be able to capture the results.

david



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.