×
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.
hi Kirk,
What would be the proper way to create/capture the debug/log info without
filling the user's display with it? Or can that be done when running
interactively?
Personally, I like to set QIBM_QSH_CMD_OUTPUT for this.
Here's an example from my handout (I give talks on this subject at
conferences):
PGM
DCL VAR(&USER) TYPE(*CHAR) LEN(10) +
VALUE('klemscot')
DCL VAR(&HOST) TYPE(*CHAR) LEN(100) +
VALUE('buddy.example.com')
DCL VAR(&CMD) TYPE(*CHAR) LEN(500)
ADDENVVAR ENVVAR(SFTP_USER) VALUE(&USER) REPLACE(*YES)
ADDENVVAR ENVVAR(SFTP_HOST) VALUE(&HOST) REPLACE(*YES)
CHGVAR VAR(&CMD) VALUE('PATH=$PATH:/QOpenSys/usr/bin && +
sftp -b /tmp/example.sftp $SFTP_USER@$SFTP_HOST')
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) +
VALUE('FILEAPPEND=/tmp/sftplog.txt') +
REPLACE(*YES)
ADDENVVAR ENVVAR(QIBM_QSH_CMD_ESCAPE_MSG) VALUE(Y) +
REPLACE(*YES)
QSH CMD(&CMD)
MONMSG MSGID(QSH0000) EXEC(DO)
SNDMSG MSG('File transfer failed! See /tmp/sftplog.txt') +
TOUSR(KLEMSCOT)
ENDDO
ENDPGM
The full PDF handout can be downloaded here:
http://www.scottklement.com/presentations
As an Amazon Associate we earn from qualifying purchases.