Q:DEVD (virtual printer device) clean-up on iSeries

Q:DEVD (virtual printer device) clean-up on iSeries

I need help to get an overview of the virtual printer device descriptions (DEVDs) on an IBM mid-range host (AS/400, iSeries). Also, how do I delete a virtual printer device that is no longer needed?

The following answer has been written with the IAPS TNe in mind, but most of it is applicable to the management of DEVDs for all kinds of host sessions – TNe on other products, IPDS, and so on.

Special information about TNe:

In general, when you create a TNxxxx printer, the host will create both a virtual printer device (DEVD/WTR) and an output queue (OUTQ) with the same name – shown as xxx below. When a TNe session is activated on the IAPS, it either uses an existing device and queue on the host, or makes the host create the device and queue, using “Device Description” for the Session configuration. And, activating the session on the IAPS automatically makes the device active on the host. So there is no need to vary the device on or start the writer via commands on the host.

You should always strive to create naming standards and stick to them, so that you don’t end up with objects you no longer use cluttering up the host. But you can’t always prevent clutter, especially when you are experimenting while learning how to best exploit the product. Therefore, you may need to delete the DEVD/WTR and OUTQ, and if so, this must be done manually on the host.

1. Getting an overview

To see an overview of the virtual printers on the host, use the following command:


Press F14 to see the status of each printer device.

Note that the terminology used for different kinds of status depends on the user-interface you use to access the host. What you are looking for is whether the status is ‘available’ or ‘unavailable’ (or ‘powered off or not yet available’) – or, if another terminology is used, whether the status is ‘varied on’ or ‘varied off’.
Note: If you press F21 and choose assistance level 1, the terms having to do with availability are used. If you choose level 2 or 3, the terms varied on and varied off are used.

2. Make device unavailable – or vary it off

Before deleting a device, the status must be ‘Varied Off’ or ‘Unavailable’ or ‘Powered off or not yet available’ (in other words, the device is not in use at the moment). From the status list displayed after pressing F14, use option ‘2’ to make individual devices unavailable or vary them off.

3. Delete device – and possibly the queue

From the WRKDEVD *VRTPRT menu, select option ‘4’=Delete to delete a device.

If the output queue is empty, it will be deleted when you delete the device.

4. Delete output queue: first clear the queue of spooled files

If the output queue is not empty, deleting the printer device will leave the used output queue untouched.

To delete that as well you first need to be sure that the output queue is empty. You can clear the output queue of spooled files either by deleting them or by moving the spooled files to another output queue.

  • To see the spooled files in the queue, use the command:
    WRKOUTQ xxx
    – where xxx is the queue name.
  • To delete all spooled files on an output queue, use the command:
    CLROUTQ xxx
    – where xxx is the queue name. Make sure no one will miss the spooled files first., because there is probably no back up of spooled files.
  • To move several spooled files, first place a ‘2’ in front of all the spooled files (do not press Enter yet!) and then type OUTQ(yyy) on the command line. When you press Enter you move all the spooled files that are marked with ‘2’ onto the output queue called yyy.

5. Delete output queue

Use the command:


Leave a Reply

Your email address will not be published. Required fields are marked *