|
SBMJOB CMD(QSH CMD('find /tmp -ls')) the results (which would be sent to stdout if displayed) will be automagically spooled.
Aha! I forgot about letting STDOUT escape QShell. Somehow I always forget that detail. By the same token, you coudl do this:
OVRDBF FILE(STDOUT) TOFILE(QSYS/QSYSPRT) STRQSH CMD('find /whatever -ls') DLTOVR STDOUTThat would spool the result interactively, without the need to submit anything. Another thing that I forgot about is the "pr" utility in QShell which can add page breaks and titles. So you could do the following:
PGM OVRDBF FILE(STDOUT) TOFILE(QSYS/QSYSPRT) STRQSH CMD('find /tmp -ls | pr -F -l 60 -w 132 -h "IFS Disk Report"') DLTOVR STDOUT ENDPGMThat'd print a header containing the date, the words "IFS Disk Report" and the page number. It'd print them every 60 lines (assuming that's how many lines per page) and cut off the text at 132 columns.
It has other capabilities as well, documented here: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzahz/pr.htm
As an Amazon Associate we earn from qualifying purchases.
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.