Change spool file status from RDY to SAV by API

50 pts.
Tags:
API
AS/400
AS/400 API
Spool files
Is it possible to change the spool file status from RDY to SAV by AS/400 API? Thanks.
ASKED: June 11, 2010  5:35 PM
UPDATED: June 14, 2010  9:18 PM

Answer Wiki

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

I’m not aware of any API nor command that will set a SAV status. Nor would I expect one because it effectively causes the system to lie to the users.

A status of SAV means that the spooled file has been processed by a writer and then kept after printing completed. If you force the status to SAV, you are skipping the “processed by a writer” part.

If you want to cause a spooled file to be set so that it <i>will be saved</i> after printing, you can run this command:<pre>
CHGSPLFA … SAVE(*YES)</pre>
Specify the spooled file name and the name of the job that created it, along with any other necessary identifying attributes. Add the SAVE(*YES) attribute. When the file is printed, the status will then become SAV automatically.

Tom

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
  • TomLiotta
    You could cause the status to be set to SAV without actually involving a printer, though it is as direct as an API or command.
    1. Create *OUTQ SAVER. Define it as a remote *OUTQ with the remote system set the same as your local system and remote printer queue as DELETER.
    2. Create *OUTQ DELETER.
    3. Make sure your LPR/LPD server is running.
    4. STRRMTWTR SAVER
    5. CHGSPLFA ... OUTQ(SAVER) SAVE(*YES)
    6. The spooled file would then be processed by the "remote writer" and the status would become SAV.
    7. A copy of the spooled file would appear in DELETER -- you can delete it. (You could have a *DTAQ associated with it to delete everything automatically.)
    From then on, all you need to do is move spooled files to SAVER after setting SAVE(*YES). And once they have status SAV, you can change their OUTQ() attribute back to where they came from. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Typo correction... ...though it is not as direct as an API or command. Tom
    125,585 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