How to save IBM i Spool files

  • Home
  • /
  • Blog
  • /
  • How to save IBM i Spool files

May 20, 2020

To save IBM i spooled files, you have a few options:

Using Native Commands:

Save All Spooled Files on the System:

Change the defaults for the system save using the SAVE menu. Go to GO SAVE and select option 20 to define save system and user data defaults.

You can use the Save menu option 20 to change the default values for the GO SAVE command, menu options 21, 22, and 23. This option simplifies the task of setting your save parameters.

In order to change the defaults, you must have *CHANGE authority for both the QUSRSYS library and the QSRDFLTS data area in the QUSRSYS library.

When you enter the GO SAVE command, then select menu option 20, the system displays the default parameter values for menu options 21, 22, and 23. If this is the first time you have used option 20 from the Save menu, the system displays the IBM-supplied default parameter values. You can change any or all of the parameter values to suit your needs. For example, you can specify additional tape devices or change the message queue delivery default. The system saves the new default values in data area QSRDFLTS in library QUSRSYS. The system creates the QSRDFLTS data area only after you change the IBM-supplied default values.

Once you define new values, you no longer need to worry about which, if any, options to change on subsequent save operations. You can review your new default options and then press Enter to start the save with the new default parameters.

If you have multiple, distributed system with the same save parameters on each system, this option provides an additional benefit. You can define the parameters from the Save menu, using option 20 on one system. Then, save the QSRDFLTS data area, distribute the saved data area to the other system, and restore it.

Change ā€œSpooled file dataā€ to *ALL and press <ENTER>.

The next save operation using options 21 (Entire system), 22 (System data only), or 23 (All user data) will include the spooled file data.

To restore the saved spooled files, use the RESTORE menu and select the appropriate option based on how the data was saved.

Using the BACKUP Menu:

Consider changing the command defaults for the SAVLIB command to SPLFDTA (*ALL):

Run this command to change the systenm defauklt to always save spool data:

CHGCMDDFT CMD(QSYS/SAVLIB) NEWDFT('SPLFDTA(*ALL)')

Exporting to PC:

From the Select Action menu, you can:

Select ā€œExport as ASCII Textā€ to convert the spooled file to an ASCII text file.

Select ā€œExport as PDF to client file systemā€ to convert the spooled file to a PDF.

Select ā€œExport as Rawā€ to copy the spooled file to the PC without conversion

Using SPLFDTA Parameter:

You can use the SPLFDTA parameter on the SAVLIB, SAVOBJ, RSTLIB, and RSTOBJ CL commands to save and restore spooled files without losing print fidelity, attributes, or identity

NOTE: These techniques also work on the old iSeries and AS400 systems.

Want to know more about Spool Files?

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe NOW
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

Online Learning for IBM i Software Technology Professionals

ā€œThe more that you read, the more things you will know. The more that you learn, the more places you’ll go.ā€ – Dr. Seuss

>