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



Thanks Scott I will give this a try. the Previous suggestion to use the '>'
catching/trapping the responses to the file but not to the screen. This is
an Interactive ( well actually a greenscreen session ) the calls the Expect
script.

They normally see the responses from the server on the screen as the script
runs but that as quit, but the file goes through and the user thinks it
hasn't transfered.

On Tue, Mar 13, 2012 at 1:54 PM, Scott Klement
<midrange-l@xxxxxxxxxxxxxxxx>wrote:

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
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





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.