I’m not a fan of using the tools that IBM puts in QMGTOOLS. Those are their tools to make problem data gathering “standardized”, I’m pretty sure they have processes on the back side to deal with a standard data set.
If you use the tools, there might be a change IBM made to something you have coded into production. Ouch.
You would be best creating your own wrapper to sFTP.
+ on using pre-shared keys, no passwords.

I believe, in addition to other stuff, the MGTools sFTP uses the concept in this link:
https://www.ibm.com/support/pages/node/687651 <https://www.ibm.com/support/pages/node/687651>

If on v7.2+ an having open source tools installed, you can install:
sshpass-1.06-1.ibmi7.2.ppc64.rpm <https://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo/ppc64/sshpass-1.06-1.ibmi7.2.ppc64.rpm>
Google can help with how to use:
https://www.redhat.com/sysadmin/ssh-automation-sshpass <https://www.redhat.com/sysadmin/ssh-automation-sshpass>


Bryan


On Dec 11, 2021, at 8:11 AM, Gad Miron <gadmiron@xxxxxxxxx> wrote:

Late to the party but here is my 2 cnts

I use QMGTOOLS/STRSFTP in several CLP PGMs
to automate download/Upload of files.
As mentioned, you can specify a password when using STRSFTP

I hard-code this password in the CLP program and use the following steps
to keep the PW hidden:

a. Code a DCLPRCOPT ALWRTVSRC(*NO) USRPRF(*OWNER)
AUT(*USE) DBGENCKEY(XXXX) in the source.
This prevents RTVCLSRC and debugging of the program object
b. delete the spool file after creating the program
c. Authorize access to the source code to CIA chief only

HTH
Gad


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.