|
We have a couple of programs that use SFTP to pull a file from our bank. The programs have been running every day for the past couple of years with no issues. Recently they were recompiled, after which they started throwing an error that said "Cannot download non-regular file: /". No changes were made to the SFTP script prior to the recompile of the program. If I enter the value of &CMD manually into the QP2TERM terminal screen, the download works as it should.
I have been wracking my brain and scouring the internet for the past week and a half trying to figure out what is going on. Has anyone ever seen this sort of thing before?
Below is the SFTP scrip and the call command we are using.
CHGVAR VAR(&CMD) VALUE('sftp -vvv -b +
/BankName/scriptname.sftp +
user@xxxxxxxx<mailto:user@xxxxxxxx>: > +
/SFTP_Logs/verbose.txt 2>&1')
CALL PGM(*LIBL/QP2SHELL) +
PARM('/QOpensys/usr/bin/sh' '-c' &CMD)
Below is the contents of scriptname.sftp.
get "Bank File Name.*" /IFS_Directory/download.txt
exit
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.