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



Eric Kempter (ekempter@best.com) wrote:

>I am looking to download multiple spool files from the AS/400 to an
>AS/400 folder or PC drive.
<snip>
>Is there a simple way to extract the necessary
>spool file information that is need for a copy command?  My plan is to
>print the contents of my outq, copy it to a file and read the file.

Eric,

To identify the spooled files to be copied you have 2 basic methods.

1. Use the WRKOUTQ or WRKSPLF commands with OUTPUT(*PRINT) and then use
CPYSPLF to copy the spooled output from that command to a physical file.

2. Use the List Spooled Files API QUSLSPL.

Method 1 is slow and will fail on subsequent releases should IBM change
the layout of the spooled file.

Method 2 is slick but more complex to program. You will also need to use
the user space APIs. If you haven't attacked these before it will be a
slight stretch, but don't let this put you off - the results will be
worth the effort. Just be careful to follow the programming guidelines
to make sure your program is future proof.

You can then run through your physical file (method 1) or user space
(method 2) and perform a CPYSPLF for each one. If you like I could let
you have a copy of a CL program that uses the QUSLSPL API to age spooled
files; it should be reasonably straight forward to hack it to suit your
purpose.

Dave Kahn - TCO, Tengiz, Kazakstan
=========

e-mail:  kahn@tengizchevroil.com    (until August 5th)
         dkahn@cix.compulink.co.uk  (from  August 6th)

Note new e-mail address in Kazakstan
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.