|
If you just submit the QSH command SBMJOB CMD(QSH CMD('find /tmp -ls')) the results (which would be sent to stdout if displayed) will be automagically spooled. the only issue I see is if the print goes past 132 it will be truncated. _____________________________ Bryan Dietz Aktion Associates midrange-l-bounces@xxxxxxxxxxxx wrote on 04/20/2006 03:01:29 PM: -> -> > Is there any way to have that spool to a splf? -> -> Probably, but I don't know how to do it directly. I suspect that there's -> a way, I just haven't figured it out yet :) -> -> You can easily write the output to a PF, however. I guess you could then -> print the PF. For example, you could do the following: -> -> PGM -> -> DLTF QGPL/TEMPFILE -> MONMSG CPF2105 -> -> CRTPF QGPL/TEMPFILE RCDLEN(132) -> CHGCURDIR DIR('/qsys.lib/qgpl.lib') -> -> STRQSH CMD('find /TMP -ls > tempfile.file/tempfile.mbr') -> -> CPYF FROMFILE(QGPL/TEMPFILE) TOFILE(QSYSPRT) -> DLTF QGPL/TEMPFILE -> -> ENDPGM -> -> However, this doesn't take care of things like page breaks or printing -> headers or any of that fun stuff. Though, you could write an HLL program, -> for example in RPG, that reads the PF and inserts nice headers and page -> breaks. -> -> Perhaps a better solution would be to download the .TXT file from the -> previous example to your PC and open it with Notepad. Then you could -> print it or do whatever you wanted with it. ->
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.