All,
I have finally gotten SFTP to work and was able to create a program to
transmitt data to the vendor.
When I run the program Interactivly, it works just fine. I get my
sftplog.txt file that i specified in my environment variable with no
problems.
However, when I run it in the batch with the same user id, the data is not
sent, and the sftplog.txt file is not created.
How can I findout what is happening differently when I run it in batch vs
interactive?


RTVDTAARA DTAARA(IOMMSFTPIP) RTNVAR(&FTP_IP)

ADDENVVAR ENVVAR(SFTP_HOST) VALUE(&FTP_IP) +
REPLACE(*YES)

ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) +
VALUE('FILEAPPEND=/tmp/sftplog.txt') +
REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE('Y') +
REPLACE(*YES)


ADDENVVAR ENVVAR(SFTP_USER) VALUE(&MMSFTPUSR)
+

REPLACE(*YES)


CHGVAR VAR(&CMD) VALUE('PATH=$PATH:/QOPENSYS/BIN&& sftp
-b +
/FACEYMMS/MMS_SCRIPT.FTPS -oPort=2222
+
$SFTP_USER@$SFTP_HOST')



QSH
CMD(&CMD)


-
CPYFRMSTMF FROMSTMF('/tmp/sftplog.txt') +
TOMBR('/QSYS.LIB/' || &LIB || +
'.LIB/SFTPLOG.FILE/' || &MEMBER |< '.MBR') +
MBROPT(*ADD)

When I run in batch, this command fails with an object not found message.

All help will be appreciated.

Thanks,


Jeff Young
Sr. Programmer Analyst

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.