List Spoolfiles

30 pts.
Tags:
Spool files
WRKSPLF
how can i list Spoolfiles like wrksplf does ? I want to list them in a subfiles. bye jo

Answer Wiki

Thanks. We'll let you know when a new response is added.

One way
– WRKSPLF can output to a spool file
– The Spool file can be copies to a flat file
– Your rpg program reads the flat file – moves record to data structure and loads SFL record

There is probably an API and/or a TATOOL for this but I’ve used this method.
Phil

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gilly400
    Hi, You should be able to use the List spooled files API Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • RichardThomas
    Hi, The List Spooled Files API (QUSLSPL) is one option, the other API you could use is the Open List of Spooled Files (QGYOLSPL) API. There are several differences between the two, as the following snippet from the Information Center highlights: <snippet> The QUSLSPL API puts the list of spooled files into a user space object provided by the caller. The calling program can directly access the user space storage. The QGYOLSPL API puts the list of spooled files into a temporary space and assigns a handle for the list. The calling program cannot directly access the storage where the list is placed. Instead, the calling program can retrieve entries from the list by passing the assigned list handle to the Get List Entries (QGYGTLE) API. The QUSLSPL API does not return control to the calling program until the list of spooled files is completely built in the user space object. The QGYOLSPL API returns control as soon as the initial number of records requested has been placed in the list. If the calling program requests zero records to be returned initially, QGYOLSPL returns immediately after it verifies parameter values, does some initial setup operations, and requests that the asynchronous host server job builds the list. The QGYOLSPL has a receiver variable parameter. The receiver variable contains the initial number of records, if any, requested. The QGYOLSPL has a list information parameter that contains the status information about the list that was built or is being built. The QUSLSPL API allows filtering on only one user profile name. The QGYOLSPL API allows filtering on multiple user profile names. The QUSLSPL API allows filtering on only one output queue name. The QGYOLSPL API allows filtering on multiple output queue names. The QUSLSPL API does not allow filtering on spooled file status. The QGYOLSPL API allows filtering on multiple spooled file statuses. The QUSLSPL API does not allow filtering on printer name. The QGYOLSPL API allows filtering on multiple printer names. The QUSLSPL API returns the list of spooled files in only one order. The QGYOLSPL API has a sort information parameter to allow sorting on one or more of the fields in the list. <End of snippet> Depending on your needs, you should evaluate which API is the most applicable. Cheers, Richard
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following