Jeff,

QIBM_QSH_CMD_OUTPUT creates a log of the IBM QShell (QSH) command (CMD) Output. That's why it has that name :-) (haha, I probably overstated that.) It will make a log of anything you do in QShell... It's not exactly an SFTP log.

Personally, I use this to diagnose failures if they occur, but I can't think of any other use for this output. Instead, use the exit status to determine if a transfer succeeded/failed, and use this output to see _why_ it failed when the failure occurs. If successful, though, this output is worthless.

If you want to stick the date/time at the start of it, you can just have QShell output the date/time... remember, this isn't an SFTP thing, it's a QShell thing, so please don't feel limited by the SFTP comands. For example:

QSH CMD('echo "---------------------------------"; +
date; +
echo "---------------------------------";
sftp -b myscript etc.etc');

This will output something like:

---------------------------------
Tue Jun 23 20:56:30 Eastern Daylight Time 2015
---------------------------------
(sftp output here)

And because you're writing all QShell otuput to the 'sftplog.txt' file, it'll contain that stuff...




On 6/23/2015 12:51 PM, Jeff Young wrote:
Scott,
I am copying the file /tmp/sftplog.txt to that I set using the ADDENVVAR
ENVVAR(QIBM_QSH_CMD_OUTPUT) which contains a log of the commands issues in
my SFTP session to a source file for logging what files were sent and any
messages issued by the SFTP session.
I would like to be able to capture the date & time as well if that is
possible.

Jeff Young
Sr. Programmer Analyst

On Tue, Jun 23, 2015 at 12:34 PM, Scott Klement <midrange-l@xxxxxxxxxxxxxxxx
wrote:

Hi Jeff,

SFTP does not normally output a log, so I'm not sure what you mean by "I
copy the log file". The responses from the remote server are not typically
human-readable, so not sure what you're looking for there. I wonder if
you're confusing SFTP with FTP? They are not the same thing (despite the
name 'SFTP', it really isn't FTP at all, it's using the SSH protocol.)

What are you trying to accomplish by saving these logs with dates/times?
What will you use them for?

-SK



On 6/23/2015 10:43 AM, Jeff Young wrote:

All,
I have an application that uses SFTP to transmit files,
Presently, I copy the log file created to a file for analysis and issue
tracking if needed.
The only information that I get in the log file is the SFTP commands
issued.
Is there any way to get additional information like the date / time and
any
responses received from the remote server?

TIA,

Jeff Young
Sr. Programmer Analyst

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

Follow-Ups:
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.