AS/400 Print Job – Save Status

5 pts.
Tags:
AS/400 jobs
AS/400 printing
Does anyone know of a way to always have a print job in the AS/400 to default to SAVE(*YES) status?

Software/Hardware used:
AS/400
ASKED: August 24, 2009  12:32 PM
UPDATED: October 11, 2009  9:33 AM

Answer Wiki

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

There is an attribute on a print file for SAVE (*YES or *NO).
Once the report is printed, then if *YES, it will save it.
*SAVE identifies a report THAT HAS PRINTED and is now being saved.
It cannot go to the queue as SAVE

When you create a print file you can have the save option set to *YES like this:
<pre>CRTPRTF FILE(YOURLIB/PRTFILE) SAVE(*YES)</pre>

If you wish to temporary override a print file that is already on the system you can use the override print file command like:

<pre>OVRPRTF FILE(QSYSPRT) TOFILE(QSYS/QSYSPRT) SAVE(*YES)</pre>

If you are using a system print file, you may have to run the program once to see which print file is being used in order to do the override to the correct print file.

You could also do a change to the print file, but if you do this it will be system wide and all user spool files will be set to save. I would recommend that you copy the print file to a user library, change that print file and then place the user library first in you library list.

<pre> CHGPRTF FILE(YOURLIB/QSYSPRT) SAVE(*YES)</pre>

————————–
Absolutely right on Charlie Brown
The OVRPRTF is often placed in the CL just before the call to the RPG program since it must be issued before the print file is opened by the program.
Phil

=========================================================

In general, don’t copy a system print file such as QSYSPRT to a user library and then place the user library at the top of the library list. Rather, duplicate the file with a different name and use the new name in your programs. Placing a version of a system printer file above IBM versions can interfere with system print functions after upgrades.

Generally, system printer files (QSYSPRT, QPQXPRTF, etc.) shouldn’t be used for in-house programming nor are they needed. A simple CRTPRTF command can create a printer file with whatever customization is needed. IBM has changed printer file definitions in the past. An unexpected change in the future can potentially mess up application output. Unlikely, yes; but why avoid using CRTPRTF and getting exactly what you want without overrides?

Tom

Discuss This Question:  

 
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

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