IMO the easiest and best means to effect spooled output of the Standard Output that is produced by a request [or requests] to be run in the Qshell, is to have issued prior to the shell request, an override of the name STDOUT to the desired Printer File; e.g. to have made the request: OVRPRTF STDOUT TOFILE(QSYSPRT). Note: When using QPRINT instead, then explicitly TOFILE(QGPL/QPRINT) because QGPL may not be in the library list; the QSYSPRT, being in QSYS, is always in the library list.

Using this method, the spooled file is owned to the job making the QSH request, rather than being owned by the spawned job. If the spooled file is not owned by the job requesting the QSH, then follow-on actions such as changing (CHGSPLFA), sending [e.g. SNDTCPSPLF], or deleting (DLTSPLF) the spool file is not so nice and simple. And the API to get the last spool file created in the job can not be of much assistance, if the spooled file was created in a spawned job.

As to possible source of confusion... if the above was not what was intended.? Perhaps recalling that the FTP PUT or GET could direct stream data [text\record or binary data] to a Printer [device] File.? Redirection is apparently not so keen on allowing that. Or perhaps just recalling the use of Rfile to write the data to a Printer File, but without the -Q option, thus allowing IFS naming for the Printer File? And likely the reference to QPRINT was a simple mistake about in which library the object resides, or the intended file name was QSYSPRT, which is in QSYS.

Regards, Chuck

On 25 May 2013 08:13, Vernon Hamberg wrote:
Ken, that is exactly right. No LIBL stuff in path naming, as you
suggest.

But I actually tried my idea, and I don't think it will ever work.
I thought I'd heard of doing it, but now I believe I was thinking of
an OVRPRTF of stdout or something like that.

So someone please relieve my confusion on a Saturday!

On 5/24/2013 8:02 PM, Ken Sims wrote:

I'm pretty sure that /qsys.lib/qprint.file means to specifically
look in QSYS and that with it being in QGPL it would need to be
specified as /qsys.lib/qgpl.lib/qprint.file.

On 24 May 2013 16:07, Dan Kimmel wrote:

I don't have a qprint in qsys. Mine is in qgpl, too. Using
qsys.lib in qsh like this just means to use the qsys file system
inside root. Use the Rfile pipe as I suggested in my earlier note
in this thread.

Ken Sims Sent: Thursday, May 23, 2013 3:27 PM

I just checked two systems and QPRINT is in QGPL, not QSYS, so
that could have something to do with it.

On Thu, 23 May 2013 09:13:36 -0500, Dan Kimmel wrote:

Nope: You get this back:

qsh: 001-0055 Error found creating file
/qsys.lib/qprint.file. Operation not supported.

Vernon Hamberg on Wednesday, May 22, 2013 11:08 PM wrote:

How about just a redirect like this -

qsh cmd('find . -name "*.c" > /qsys.lib/qprint.file')

Not sure if that'd work, but something like it should.
Maybe chain an OVRPRTF command in the QShell command
string.

On 5/22/2013 4:56 PM, Dan Kimmel wrote:

Might actually work better for you if you leave out the
binary flag and let it translate to EBCDIC.

qsh cmd('find . -name "*.c" | Rfile -wQ qprint')

Dan Kimmel on Wednesday, May 22, 2013 4:45 PM wrote:

This will put the report into a QPRINT file:
qsh cmd('find . -name "*.c" | Rfile -wbQ qprint')

On 22 May 2013 09:49, fbocch2595@xxxxxxx wrote:

what's the syntax to make the following command
print a report on the i?

QSH CMD('FIND / -name ''*.zip''')

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.