|
<<SNIP>>
Scott Klement provided examples of which I used
Here is what I have ended up with
PGM
/* To compile: */
/*> CRTPF QTEMP/LSOUTPUT RCDLEN(1000)<*/
<<SNIP some CLP source declarative>>
DCLF FILE(LSOUTPUT)
<<SNIP some CLP source>>
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) +
VALUE('FILEAPPEND=/tmp/sftplog.txt') +
REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE(Y) +
REPLACE(*YES)
DLTF FILE(QTEMP/LSOUTPUT)
MONMSG MSGID(CPF2105)
CRTPF FILE(QTEMP/LSOUTPUT) RCDLEN(1000)
<<SNIP more source>>
OVRDBF FILE(STDOUT) TOFILE(QTEMP/LSOUTPUT)
/* CHGVAR VAR(&CMD) VALUE(&CMD *TCAT '> +
/qtcptmm/SFTPlogoutput.txt 2>&1') */
CHGVAR VAR(&CMD) VALUE(&CMD *TCAT &NULL)
CALL PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' +
'-c' &CMD)
DLTOVR FILE(STDOUT)
OVRDBF FILE(LSOUTPUT) TOFILE(QTEMP/LSOUTPUT)
DOUNTIL COND(&EOF *EQ '1')
RCVF
<<SNIP more source>>
ENDDO
DLTOVR FILE(LSOUTPUT)
ENDPGM
I have compiled this and run it, but the file QTEMP/LSOUTPUT is
empty
I have also run sftp interactively using the following commands
CALL PGM(QP2TERM)
<<SNIP>>
The questions are
what is wrong with my CLP program and
how can I log what happens within sftp
As always - any and all responses gratefully accepted
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.