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



Here's a CLP that we called using QCMDEXEC that has worked for us (with
testing/privacy changes)
PGM
DCL VAR(&CMDSH) TYPE(*CHAR) LEN(20) +
VALUE('/QOpenSys/bin/sh')
DCL VAR(&PARM) TYPE(*CHAR) LEN(200)
DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(X'00')
CHGVAR VAR(&CMDSH) VALUE(&CMDSH *TCAT &NULL)

CHGVAR VAR(&PARM) VALUE('sftp +
-b /home/USERS/someuser/myscript.sftp +
tst@xxxxxxxxxxxxxxxx' *TCAT &NULL)

/*CALL PGM(QP2SHELL) +
PARM(&CMDSH &PARM) */

SBMJOB CMD(CALL PGM(QP2SHELL) PARM(&CMDSH &PARM)) +
JOBD(AS8JD) USER(CDHTST)


Then the ftp script is:
************Beginning of data**************
cd CDOB
put /home/IT/test4.txt
************End of Data********************





Bill Roehmer
Senior Pgmr/Analyst
The C.D. Hartnett Company

817 594-3813 ext. 1631


"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments
accompanying it) contain confidential information belonging to the sender.
The information is intended only for the use of the intended recipient.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in reliance
on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify
the sender by reply e-mail, and then destroy all copies of the
transmission."






From: Guy Henza <guyhenza@xxxxxxxxxxx>
To: RPG <rpg400-l@xxxxxxxxxxxx>
Date: 02/02/2017 10:08 AM
Subject: Writing a SFTP script from a RPG program
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



I have a RPG program writing a FTP script and executing it. Now
management says it needs to be SFTP.

I understand that it runs from QSH and it runs on the IFS.

I will not be in charge of getting SFTP working just the program to write
and execute the script.

Does anyone have any sample code they would be willing to share?


Regards,

Guy Henza
guyhenza@xxxxxxxxxxx<mailto:guyhenza@xxxxxxxxxxx>


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.