This document contains instructions for creating a dummy device description to use with a remote output queue (RMTOUTQ).
Resolving The Problem
Note: This document was previously entitled, Using TCP/IP Remote Print Writers with Applications Requiring a Device Description.
This document contains instructions for creating a dummy device description to use with a remote output queue (RMTOUTQ). Dummy device descriptions are typically used when printing from applications that do not support printing directly to an output queue but only to a printer (including Query/400 and the IBM System/36 Environment). They are also useful when moving spooled files from one printer to another from the Work with Output Queue (WRKOUTQ) or Work with Spooled Files (WRKSPLF) commands or when using Operations Navigator to drag and drop spooled files from one printer to another.
|Caution: If dummy device descriptions are used with Remote Output Queues (RMTOUTQs) and a system save is performed and later a system restore is performed, the dummy device description will be restored as a *VRT 3812 printer device description with a normal output, but the RMTOUTQ will not be restored. This occurs because the output queue will already exist as a normal output queue at the time that the remote output queues would normally be restored. When using RMTOUTQs with dummy device descriptions, it is recommended that the RMTOUTQs be fully documented so they can be re-created correctly after performing a system restore.|
This problem will not occur if the QUSRSYS library is restored before using the Restore Configuration (RSTCFG) command, which restores all of the printer device descriptions along with the rest of the configuration objects that were saved by the Save System (SAVSYS) or Save Configuration (SAVCFG) commands.
For more information on restoring Remote Output Queues (RMTOUTQs), please refer to the following document:
N1014238: Restoring Remote Output Queues (RMTOUTQs) when Migrating to a New iSeries System
This document was last updated on 26 November 2013.
Creating a Dummy Device Description to Use with a Remote Output Queue
Use the following steps to create a dummy device description:
|1.||Before a dummy device description can be created, the Remote Output Queue (RMTOUTQ) must reside in the QUSRSYS library. If not, creating the dummy device description will cause you to have two output queues of the same name -- one in the current library for the remote output queue and one in QUSRSYS. Use the following Work with Objects (WRKOBJ) command to verify that the remote output queue is in library QUSRSYS:|
WRKOBJ OBJ(*ALL/output-queue) OBJTYPE(*OUTQ)
|2.||To move the RMTOUTQ to library QUSRSYS, first use the following End Writer (ENDWTR) command with the When to end writer (OPTION) parameter set to *IMMED to end the writer immediately:|
ENDWTR WTR(output-queue) OPTION(*IMMED)
Then issue the following Move Object (MOVOBJ) command:
MOVOBJ OBJ(outq-library/output-queue) OBJTYPE(*OUTQ) TOLIB(QUSRSYS)
|3.||If the RMTOUTQ was configured with the Writers to autostart (AUTOSTRWTR) parameter set to 1, then the remote writer should be ended prior to creating the dummy device description. This is to ensure that the output queue is properly associated with the printer device description that is created.|
If the writer was not ended for Step 2 above, then use the following End Writer (ENDWTR) command with the When to end writer (OPTION) parameter set to *IMMED to end the writer immediately:
ENDWTR WTR(output-queue) OPTION(*IMMED)
Note: If the remote writer is not ended before configuring the dummy device description, then the Work with Spooled Files (WRKSPLF) command might fail to find the spooled files in the remote output queue when the device name is specified in the Print device portion of the Select files for (SELECT) parameter.
|4.||Use the following Create Device Desc (Printer) (CRTDEVPRT) command to create a device description with the same name as the remote output queue:|
CRTDEVPRT DEVD(output-queue-name) DEVCLS(*VRT) TYPE(3812) MODEL(1)
Note: The remote writer uses the settings in the output queue description, not the device description, so there is no need to vary on the *VRT 3812 dummy device description and no need to set the Online at IPL (ONLINE) parameter to *YES. If the *VRT dummy device description is created with the Attached controller (CTL) parameter left blank, attempting to vary on the device will result in error message CPD2609 "Device &25 configuration not valid. Reason code &1" with RC2301, which indicates that device that is not attached to a controller description cannot be varied on.
|5.||If the RMTOUTQ was configured with the Writers to autostart (AUTOSTRWTR) parameter set to 1, then issuing the above CRTDEVPRT command should automatically restart the remote writer. If not, then the remote writer can be started using the following Start Remote Writer (STRRMTWTR) command:|
|6.||Creating the dummy device description should result in message CPI2611 "Output queue &1 in &2 already exists." This indicates that the printer device description is associated with the remote output queue that has already been created.|
If this message is not received, it most likely means that the remote output queue was not in library QUSRSYS and the Create Device Desc (Printer) (CRTDEVPRT) command has created a second output queue (but not a remote output queue) with the same name in library QUSRSYS. The problem with this is that applications typically send spooled files to the output queue in library QUSRSYS; however, because this is not a remote output queue, the spooled files are not sent to the printer.
|7.||If working in the System/36 Environment, use the Display System/36 Configuration (DSPS36) command to verify the System/36 printer IDs. The Change System/36 Configuration (CHGS36) command can be used to change the System/36 printer IDs or to assign a new System/36 printer ID to point to the new dummy device description.|
Note: When a printer is specified in the //PRINTER OCL statement, you are using the System/36 printer ID for that printer. The System/36 Environment then uses a print file in library #LIBRARY that has the same name as the printer ID. If the output is not going to the correct printer, specify the output queue name on the //PRINTER OCL status or use the Change Printer File (CHGPRTF) command to point the printer file directly to the remote output queue:
|1.||Do not use the Vary Configuration (VRYCFG) or the Work with Configuration Status (WRKCFGSTS) commands to vary on the printer device description. The remote writer uses the settings in the output queue description, not the device description, so there is no need to vary on the *VRT 3812 dummy device description.|
If the *VRT dummy device description is created with the Attached controller (CTL) parameter left blank, attempting to vary on the device will result in error message CPD2609 "Device &25 configuration not valid. Reason code &1" with RC2301, which indicates that device that is not attached to a controller description cannot be varied on.
|2.||Do not use the Start Print Writer (STRPRTWTR) command or Option 1 (Start) from the Work with Writers (WRKWTR) command to start the writer. Use the Start Remote Writer (STRRMTWTR) command instead to start a writer using the remote output queue.|
|3.||RMTOUTQs use remote writers, not printer writers. However, the WRKWTR command defaults to WTR(*PRT), which only shows all of the active and inactive printer writers. Therefore, using the WRKWTR command without any parameters will show the writer to be in END status, even when the remote writer is started.|
|4.||The settings in the dummy device description have no affect on how the remote writer communicates with the printer or on how the operating system formats spooled files for the printer. This includes, but is not limited to, the settings for the Online at IPL (ONLINE), Attached controller (CTL), Font identifier (FONT), Message queue (MSGQ), and Host print transform (TRANSFORM) parameters. For example, to control which message queue is used for all writer messages, the message queue must be specified in the MSGQ parameter in the output queue description, not in the MSGQ parameter in the dummy device description.|
|5.||To determine if the remote writer is started, use the Work with Writers (WRKWTR) command with the Writer (WTR) parameter set to *ALL. For example, the WRKWTR WTR(*ALL) command shows all active writers rather than showing only all active and inactive printer writers.|
18 December 2019