How do I retreive the spool file number

5 pts.
Tags:
AS/400
AS/400 Spool Files
How do I retrieve the spool file number of a spool file in v5.4?

Software/Hardware used:
AS400 V5.4

Answer Wiki

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

Discuss This Question: 4  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
  • TomLiotta
    Call the List Spooled Files (QUSLSPL) API with as much identifying information as you can supply. Requesting that format SPLF0300 should be returned will probably be easiest. Process the list that is returned to find the specific spooled file that you want. Retrieve the spooled file number from the SPLF0300 structure for the spooled file entry in the list. -- Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    You could also call the Retrieve Spooled File Attributes (QUSRSPLA) API to retrieve format SPLA0100. That requires passing a spooled file number in as a parameter; but you can use a special value (0) to indicate that only one spooled file exists in a job, a different value (-1) to indicate that you want the first spooled file from a job and a third value (-2) to get the last spooled file. By creative uses of calling the API, you can figure out valid spooled file numbers. If a CPD3C40 error is returned, for example, you can figure that the spooled file number isn't valid. The first spooled file number has to be (1), and the API can return the last number that exists for the job. -- Tom
    125,585 pointsBadges:
    report
  • WoodEngineer
    If you need to do this in CL and have the TAA tools library on your system, check out RTVSPLFA.
    6,365 pointsBadges:
    report
  • Krttrs
    DCL VAR(&JOB)       TYPE(*CHAR) LEN(10)    DCL VAR(&USER)      TYPE(*CHAR) LEN(10)    DCL VAR(&Nbr)       TYPE(*CHAR) LEN(6)     OVRPRTF    FILE(LIST) TOFILE(QSYS/QSYSPRT) PAGESIZE(*N +                  160) MAXRCDS(*NOMAX)                            CALL       PGMRTVJOBA    job(&job) USER(&USER) NBR(&NBR)    CvtSplStmF  FromFile(List)     +                 toStmF(&RatRpt)   +                 toDir(GreenBar)   +                 JOB(&NBR/&USER/&JOB) +              SPLNBR(*LAST)     +                 toFmt(*HTML)      +                 StmfOpt(*Replace) +                 Title(&Title)          MONMSG     CPF0001                  DltSplF    file(LIST)             +              JOB(&NBR/&USER/&JOB) +              SPLNBR(*LAST)                                                                                           
    65 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