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



On 13-Oct-2016 01:37 -0500, Fred Keith wrote:

A possible workaround (with my poor knowledge of QSH/xNIX commands)
would be (using your example, displaying the first 30 lines of the
file):

CPYSPLF FILE(QPRTSPLQ) TOFILE(*TOSTMF)
TOSTMF('/buck/qprtsplq.txt') WSCST(*NONE)

STRQSH CMD('head -30 /buck/qprtsplq.txt')

Of course it is possible to redirect the output of head command to a
file, or different files based on the requirements.


Or ditch the Copy From Spooled File (CPYSPLF) and just use the QShell utility `catsplf`; assumed: QPRTSPLQ was Spooled File Number SPLNBR(1), and a conspicuously contrived qualified job name:

QSH CMD('catsplf -j 999999/BUCKSUSER/BUCKSJOB QPRTSPLQ 1 | head -30')

The already discussed SQL request could be used to generate a shell-script that potentially could be run to perform all the work that the OP alluded was required.


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.