Admin Alert: Moving Printer Devices and Remote Outqs Between Systems
March 22, 2006 Joe Hertvik
In recent columns, I discussed the ins and outs of moving entire libraries between i5/OS partitions when you are installing software or you are migrating libraries in advance of a corresponding partition migration or a hardware change. This week, I am setting my sights on smaller game as I detail the ups and downs of moving a system printer device or remote output queue between partitions.
The most common reason for moving printer objects to a secondary system is to prepare a new partition that will replace an existing partition and all of its functionality. You may also need to use the restoration part of these techniques to recreate an existing damaged printer object from media. I don’t, however, recommend moving or copying a printer object to a new partition simply to duplicate the same printer setup on two different systems, as there is a very good technique for easily sharing a writer between two or more partitions.
When discussing printer and output queue migration, you must first understand that the i5/OS operating system supports two types of printer objects–printer devices and remote output queues-and that there are differences in the way each object is configured inside the operating system. Printer devices are used to define local printers that are either directly attached to or are controlled from an i5, iSeries, or AS/400 box. Remote output queues are spooling writers that send OS/400 spooled file output to a printer that is located on and controlled by a remote system, such as on a Windows box or on another i5, iSeries, or AS/400 machine. A printer device contains an associated output queue for printing spooled files, while a remote output queue is not associated with any i5/OS device.
It’s critical to know these differences because each printer object type determines how you back up and restore a printer device or a remote output queue from one system to another. A printer device is considered a system configuration object that tells i5/OS how to direct spooled files from its associated output queue to a printer that is directly accessible from an i5. A remote output queue is an output queue object that contains configuration parameters for sending spooled files to another system for processing. Here are the two different ways you move each type of object to a new system.
Moving a Printer Device to a New System
Printer devices are saved to media or to a save file by using the i5/OS Save Configuration command (SAVCFG). SAVCFG saves all system configuration objects (including all system devices) and all system resource management objects. SAVCFG is an all inclusive command that saves all configuration objects at one time; you cannot run it selectively so that it only saves certain objects and ignores other objects. Although it can run as its own individual backup routine, SAVCFG is also run as part of the i5/OS full system backup that is executed by selecting option 21 (Entire system) from the GO SAVE green-screen menu.
As opposed to full library, DLO, and Integrated File System backups, a SAVCFG backup is a relatively short operation. It usually runs in less than ten minutes, and you do not have to put the system in a restricted state to use SAVCFG. A typical SAVCFG command for backing up system configuration data to a save file looks like this.
SAVCFG DEV(*SAVF) SAVF(Save_file_library/Save_file_object_name))
Configuration data can also be backed up to tape or any other media that the operating system can access. Also remember that when you save a printer device along with the rest of your configuration data, all of the spooled file output that resides in the device printer output queue will not be saved; note that spooled files cannot be moved between systems this way.
To restore a printer device to a new system, move your SAVCFG backup to the target system by either physical placing the media in a system media drive or by FTPing the backup save file over to that system. For information on FTPing a save file between two different i5, iSeries, or AS/400, see my recent article on Moving Libraries Between i5/OS Partitions.
Once the SAVCFG backup is available on the new system, you can easily restore a printer device by running one of the following two Restore Configuration commands (RSTCFG).
If you are restoring the printer device from a save file, run this version of the command:
RSTCFG OBJ(printer_device) DEV(*SAVF) OBJTYPE(*DEVD) SAVF(Save_file_library/Save_file_name)
If you are restoring the printer device from media, run this version of the command:
RSTCFG OBJ(printer_device) DEV(media_device) OBJTYPE(*DEVD)
When your printer device is restored to the new system, it will also create a corresponding output queue with the same name for the printer device spooled files. If the original owner of the printer device from the source system does not exist on the new system, i5/OS will designate the default user profile (QDFTOWN) as the new owner of the restored device.
Also note that this technique is not necessary if you are using the i5/OS auto-configuration feature to recreate a Client Access PC5250 printer session on a new partition, as the system will recreate the printer device for you the first time you fire up the printer session on the new system.
Moving a Remote Output Queue to a New System
Moving a remote output queue between systems is similar to moving a printer device, except that you use different save and restore commands. Also similar to moving printer devices, all the spooled file output that resides in the remote output queue will not be saved and restored to the new system.
Along with any other system output queue, remote output queues can be saved by using one of the following two commands.
They can be saved as part of the library where they reside by using the Save Library command (SAVLIB), like this:
SAVLIB LIB(Library_name) DEV(media_device_name)
If you want to save the library to a save file, you would run the SAVLIB command like this:
SAVLIB LIB(Library_name) DEV(*SAVF) SAVF(Save_file_library/Save_file_name)
Alternatively, you can individually save remote output queues by running the Save Object command (SAVOBJ) to only save output queue objects (*OUTQ) from that library. To save all the output queues in an individual library to media, you could run a command like this:
SAVOBJ OBJ(*ALL) LIB(Library_name) DEV(media_device_name) OBJTYPE(*OUTQ)
To save the output queues to a save file, you could run the SAVOBJ command this way:
SAVOBJ OBJ(*ALL) LIB(Library_name) DEV(*SAVF) OBJTYPE(*OUTQ) SAVF(Save_file_library/Save_file_name)
After you transfer the media or save file containing your remote output queues, you can restore them on the target system by using one of the following commands, depending on whether you are restoring from a save file or from a media device.
RSTOBJ OBJ(remote_output_queue_name) SAVLIB(Library_name) DEV(*SAVF) OBJTYPE(*OUTQ) SAVF(Save_file_library/Save_file_name)
RSTOBJ OBJ(remote_output_queue_name) SAVLIB(Library_name) DEV(media_device_name) OBJTYPE(*OUTQ)
Once the RSTOBJ command is run, your remote queues will be ported (restored) to the target system with the exact same parameters that they used on the source system.
The nice thing about restoring remote output queues with RSTOBJ is that you might not even have to perform a special SAVLIB or SAVOBJ backup on your source system to restore the queues. If you run a nightly backup to save the libraries where your target remote output queues reside, you can just use the latest tapes for restoring the queues.