Is it possible to save all spool files in one PF and read those members?If so how?
Announcement
Collapse
No announcement yet.
Save all spool files in one file
Collapse
X
-
-
Re: Save all spool files in one file
You could use CPYSPLF... the easiest way (and please post the code for Jamie afterwards... he loves CL
)
Also, check here ... it might work as well.Regards
Kit
http://www.ecofitonline.com
DeskfIT - ChangefIT - XrefIT
___________________________________
There are only 3 kinds of people -
Those that can count and those that can't.
-
Re: Save all spool files in one file
depending on the version you can now save outqueues (with spooled files) and restore them later.
You could even use a CL program to do this.
When you save an output queue with the save commands, menu, or QSRSAVO API, you can choose to save all its spooled files. You can do this by specifying *ALL for the Spooled file data (SPLFDTA) command parameter, menu prompt or API key. When you restore output queues with the restore commands, menu, or QSRRSTO API, you can choose to restore any saved spooled files that do not already exist on the system. You can do this by specifying *NEW for the SPLFDTA parameter, prompt, or key. With the QSRSAVO and QSRRSTO APIs, you can also choose to save or restore spooled files by using a set of selection criteria. If you save spooled files with the QSRSAVO API using selection criteria and the *SPLF special library value, then you must use the QSRRSTO API with the *SPLF special library value to restore the spooled files.
This example describes how to save spooled files:
Create an output queue to store the spooled files.
Use the Work with Spooled File (WRKSPLF) command to list the spooled files.Code:CRTOUTQ OUTQ(lib-name/que-name)
Use option 2, Change Spooled File Attributes (CHGSPLFA) command to move the spooled files you wish to save to the output queue you created.
Use the Save Object (SAVOBJ) command to save the spooled file data.
This example describes how to restore spooled files:Code:SAVOBJ OBJ(que-name) LIB(lib-name) DEV(dev-name) OBJTYPE(*OUTQ) SPLFDTA(*ALL)
Restore spooled files that are not already on the system.
JamieCode:RSTOBJ OBJ(que-name) SAVLIB(lib-name) DEV(dev-name) OBJTYPE(*OUTQ) SPLFDTA(*NEW)
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: Save all spool files in one file
If you use CPYSPLF, you need to remember to have it include the printer control characters, the command only copies the text data. You will need the control characters to recreate the spool file, which you will need to write a program to do. If this is for archive purposes the save commands have had a parm to save the spool file data as of V5R4.
Comment
-
Re: Save all spool files in one file
Hello Jamief,
Thanks so much for the response.Can u please tell what must be specified in the attribute for dev-name.I tried specifying *SAVF for device.It gives me a error saying file not found in the said library.Please guide.
Comment
-
Re: Save all spool files in one file
Please post the FULL command you attempted and we can help you from there.All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment





Comment