IBM Support

Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer

Troubleshooting


Problem

This document provides information on configuring and using a Remote Output Queue (RMTOUTQ) for sending operating system spooled files specifically to a thermal label, receipt, or Point-of-Sale (POS) printer.

Resolving The Problem

Note: This document was formerly titled "Configuring a Remote Output Queue (RMTOUTQ) to a Thermal Label Printer".

This document provides information on configuring and using a Remote Output Queue (RMTOUTQ) for sending operating system spooled files specifically to a thermal label, receipt, or Point-of-Sale (POS) printer, including those from Epson, IBM, Monarch, TransAct Technologies (Ithaca), Sato, and Zebra.. These printers use text-based controls usually preceded by a special character such as a Karat ("^"), At Sign ("@"), or Logical Not ("¬").

This document shows how to configure the RMTOUTQ with the system-supplied QWPDEFAULT workstation customizing object (WSCST) object which causes Host Print Transform (HPT) to convert the operating system spooled file to an ASCII data stream containing only text and simple controls (such as Carriage Return, Line Feed, and Form Feed).

Requirements for using a Remote Output Queue (RMTOUTQ) include the following:

oHaving a TCP/IP interface configured and started on the IBM System i,
oHaving a TCP/IP address assigned to the printer or remote host,
oHaving a Line Print Daemon (LPD) TCP/IP process enable and running on the internal or external print server or remote host, and
oEither having a print queue configured on the internal or external print server, which is typically automatic when LPD is enabled on a print server, or having a print queue configured and shared on the remote host.

This document was last updated on 26 November 2013.





For information on configuring a Remote Output Queue (RMTOUTQ) for another type of printer, please refer to the following document:

N1010090: Configuring a Remote Output Queue (RMTOUTQ)

For detailed information on configuring a Remote Output Queue (RMTOUTQ) for sending spooled files to a print queue on a PC running a supported version of Microsoft Windows (such as Windows 7, Windows 2003 Server, or Windows XP Professional), please refer to the following document:

N1018931: Configuring a Remote Output Queue (RMTOUTQ) to a Windows Print Queue

For detailed information on configuring a Remote Output Queue (RMTOUTQ) for sending spooled files to an output queue on the same or another IBM i system or logical partition (LPAR) using LPR/LPD, please refer to the following document:

N1019442: Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD

For detailed information on configuring a Remote Output Queue (RMTOUTQ) for sending spooled files to an output queue on the same or another IBM i system or logical partition (LPAR) using SNADS, please refer to the following document:

N1019700: Printer Passthrough or Remote Output Queues





Requirements and Restrictions

Requirements include a TCP/IP interface configured in the operating system, a TCP/IP address on the printer side, and a Line Print Daemon (LPD) TCP/IP process running on the print server. Restrictions include no page range printing. Controlling the output can also be a problem because of the lack of control over the sending of spooled files. Once a spooled file has started sending, a user may have a tough time stopping the printing from the operating system side. Putting the spooled file on hold or deleting it may not be successful. For a more complete listing of restrictions, please refer to the document:

N1019659: Capabilities and Limitations of Remote Output Queues (RMTOUTQs)


Recommended Fixes (PTFs) and Group PTFs

There are no required PTFs to print using a RMTOUTQ; however, getting the latest print-related TCP fixes for the operating system will typically help you avoid problems when using RMTOUTQs.

For a list of the latest Print PTFs, refer to the Recommended Fixes Web site which is available at:

http://www-912.ibm.com/s_dir/slkbase.nsf/recommendedfixes

For information on the Print and TCP/IP Group PTFs, refer to the PSP - Group PTFs Web site which is available at:

http://www-912.ibm.com/s_dir/sline003.NSF/GroupPTFs?OpenView&view=GroupPTFs


Configuration Instructions

To create a remote output queue, use the Create Output Queue (CRTOUTQ) command. The following parameters should be specified:

Output Queue and Library (OUTQ)
The output queue name can be any name that you choose. It is recommended that you set the output queue library to QUSRSYS in case you need to use a dummy device description for some of your applications. For instructions on creating a dummy device description, please refer to the following document:

N1010256: Creating a Dummy Device Description to Use with a Remote Output Queue (RMTOUTQ)

Remote System (RMTSYS)
When configuring a RMTOUTQ, specify the TCP/IP address for the printer, host name, or DNS name. If a TCP/IP address is used, the Remote System (RMTSYS) parameter should be set to *INTNETADR and the TCP/IP address for the printer should be specified in the Internet Address (INTNETADR) parameter which comes later on in the output queue description. If a host name or DNS name is used, that name should be typed in the Remote System (RMTSYS) parameter.

If a TCP/IP address is used, verify that the operating system can reach the printer using the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that TCP/IP address. If a host name or DNS name is used, verify that the operating system can reach the printer using the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that host name or DNS name.

Remote Printer Queue (RMTPRTQ)
This specifies the LPR queue name that the LAN-attached printer or LAN print server is expecting for LPD (or Line Printer Daemon) print requests. The LPR queue name is hardware specific. This value is typically case sensitive as well, so it should be specified in single quotes.

For a list of recommended values for the Remote Printer Queue (RMTPRTQ) parameter, refer to the following document:

N1010172: Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)

Note: If the correct RMTPRTQ parameter is not set to correct LPR queue name, or if it is specified in the wrong case, then the RMTOUTQ will be unable to connect to the Windows PC or server and therefore the spooled file will stay in SND (Sending) status and will not print.

Writers to Autostart (AUTOSTRWTR)
Specifies the number of remote writers that are started automatically by the system. It is recommended that this be set to 1 so the remote writer will automatically be started after an IPL after restarting the QSYS subsystem or after making a change to the output queue description. If not, the writer must be started manually using the Start Remote Writer (STRRMTWTR) command

Connection Type (CNNTYPE)
This must be set to *IP. This indicates that the RMTOUTQ communicates using TCP/IP.

Destination Type (DESTTYPE)
In this case, this must be set to *OTHER. This should be set to *OTHER when printing OS/400 or i5/OS spooled files to printers that are attached to the LAN/WAN using a print server, a PC, or a Unix® server, and should be set to *OS400 when sending spooled files from one iSeries family system to another.

Host Print Transform (TRANSFORM) or Transform SCS to ASCII (TRANSFORM)
This needs to be set to *YES so the OS/400 or i5/OS system's Host Print Transform (HPT) function will convert both SCS and AFPDS spooled files to the printer's data stream. This would instead be set to *NO if using the TSPRWPR utility to get page range support with your remote output queue. For more information on the TSPRWPR utility, please refer to the following document:

N1019686: TSPRWPR Remote Writer Page Range Support Exit Program

User Data Transform and Library (USRDTATFM)
Specifies the qualified name of a user-defined data program used to transform the spooled file data. This should be set to *NONE unless using the TSPRWPR utility to get page range support with your remote output queue (as mentioned above).

Manufacturer Type and Model (MFRTYPMDL)
This indicates the type of ASCII printer being used. This value is used by HPT to determine what ASCII controls to use when converting the spooled file from SCS or AFPDS to ASCII. For a list of what manufacturer type and model (MFRTYPMDL) values to use for various printers, please refer to the following document:

N1019605: Information on Printers from Various Manufacturers

Note: Remote output queues (RMTOUTQ) do not have a parameter to select the page size. Therefore, Host Print Transform (HPT) selects a default page size based on the manufacturer type and model chosen in the output queue description. If a page size other than the default is needed, the page size can be implied by one of the special settings for the MFRTYPMDL parameter, such as *WSCSTLEGAL for 8.5 x 14.0 inch or legal sized paper, and the manufacturer type and model can be implied by using a system-supplied or modified workstation customizing object (WSCST). For more information, please refer to the following documents:

N1019620: Forcing a Remote Output Queue (RMTOUTQ) to Select a Particular Paper Size
N1019698: Printer Model Settings for Host Print Transform (HPT)

Workstation Customizing Object (WSCST)
When configuring a RMTOUTQ for a thermal label printer, this is typically set to system-supplied workstation customizing object QWPDEFAULT in library QSYS.

Internet Address (INTNETADR)
The Internet Address (INTNETADR) parameter must be set to the TCP/IP address for the printer when the Remote System (RMTSYS) parameter has been set to *INTNETADR. The TCP/IP address must be entered without leading zeros (for example, use 192.186.10.2 rather than 192.186.010.002).

Destination options (DESTOPT)
Specifies destination-dependent options. Typically, this is set to 'XAIX' (all uppercase) when running V4R4M0 (R440) OS/400 or higher, or set to 'XAUTOQ XAIX' (all uppercase) when running .V4R3M0 (R430) OS/400 or lower.

The XAIX value specifies that the remote writer is to send the spooled file to the printer multiple times if the number of copies is greater than 1. Using the XAIX value in the destination options (DESTOPT) parameter is recommended; however, there are times when it should not be used. With XAIX specified, the remote writer opens the connection to the printer and sends down multiple copies of the print data and control file pair. Each control file contains one print command for the data file that preceded it. This method is required for printers, which start printing the data right away. However, there are some print servers which will close the connection after the first copy is sent. This is an unexpected close, resulting in retrying to send from the beginning which will cause the remote writer to loop forever and causing the spooled file to be printed indefinitely. In this case, XAIX should not be used. When XAIX is not specified, the data file and control file will be sent once; however, the control file will contain multiple print commands. This reduces network traffic but can be used only with servers that can buffer all the data before knowing how many copies to print. Therefore, without XAIX specified, the print server may not print multiple copies of the OS/400 or i5/OS spooled file.

The XAUTOQ value does not need to be specified if running V4R4M0 (R440) OS/400 or higher. This value specifies that the remote writer is to save the ASCII printer data stream in a *USERASCII spooled file whenever the print server, PC, or Unix server times out, so that *USERASCII spooled file, which is an ASCII equivalent of the original spooled file, can be sent immediately after the remote writer has make another connection to the printer. In newer releases, the *USERASCII spooled file has the same name as the original spooled file but with the number of pages set to "1*". In older releases, the *USERASCII spooled file would still have the number of pages set to "1*" but the spooled file would be named "LPDxxxxx" where the "xxxxx" represents a unique 5-digit number.

Note: XAUTOQ processing is automatically performed, and therefore does not need to be specified in the Destination options (DESTOPT) parameter, when running V4R4M0 (R440) OS/400 or higher. Without XAUTOQ processing, large spooled files could stay in SND status indefinitely so it is highly recommended that XAUTOQ be specified when running V4R3M0 (R430) OS/400 or earlier.

Print separator page (SEPPAGE)
Specifies whether to request a separator page (or TCP/IP trailer page) when printing on a remote system. This setting can be overridden by the print server, PC, or Unix server. Therefore, there is no guarantee that setting the print separator page (SEPPAGE) parameter to *YES will result in getting a TCP/IP trailer page just as there is no guarantee that setting the print separator page (SEPPAGE) parameter to *NO will result in not getting a TCP/IP trailer page.


Configuration Example

Following is an example of a Remote Output Queue (RMTOUTQ) to a LAN-attached thermal label printer. The ">" indicates important parameters to set. The Remote Output Queue (RMTOUTQ) can be configured using the Create Output Queue (CRTOUTQ) command. Type CRTOUTQ on an operating system command line, press the F4 (Prompt), fill in the following parameters, and press the Enter Key to create the RMTOUTQ:

Output queue . . . . . . . . . . > LABELPRT      Name
 Library  . . . . . . . . . . . >   QUSRSYS     Name, *CURLIB
Maximum spooled file size:
 Number of pages  . . . . . . .   *NONE         Number, *NONE
 Starting time  . . . . . . . .                 Time
 Ending time  . . . . . . . . .                 Time
              + for more values
Order of files on queue  . . . .   *FIFO         *FIFO, *JOBNBR
Remote system  . . . . . . . . . > *INTNETADR
Remote printer queue . . . . . . >
Refer to document N1010172: Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)
Writers to autostart . . . . . .   1             1-10, *NONE
Queue for writer messages  . . .   QSYSOPR       Name
 Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *
Connection type  . . . . . . . . > *IP           *SNA, *IP
Destination type . . . . . . . . > *OTHER        *OS400, *OS400
Transform SCS to ASCII . . . . . > *YES          *YES, *NO
Manufacturer type and model  . . > *WSCSTCONT132

Workstation customizing object   > QWPDEFAULT    Name, *NONE        
  Library  . . . . . . . . . . .     QSYS        Name, *LIBL, *CURLIB
Internet address . . . . . . . . >
Destination TCP/IP Address
Destination options  . . . . . . > XAIX
Text 'description' . . . . . . . > 'RMTOUTQ to a Thermal Label Printer'

Note: If the Writers to autostart (AUTOSTRWTR) parameter is set to 1, the writer will automatically start after the RMTOUTQ has been created. If not, the writer must be started using the Start Remote Writer (STRRMTWTR) command.


Configuring a Dummy Device Description to Use with a Remote Output Queue

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 device description (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 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 queue, 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 RMTOUTQs 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 information can also be found in the following document:

N1010256: Creating a Dummy Device Description to Use with a Remote Output Queue (RMTOUTQ)

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)
          ONLINE(*NO) FONT(011)

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:

STRRMTWTR WTR(output-queue)
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:

CHGPRTF FILE(#LIBRARY/system-36-printer-id)
        OUTQ(outq-library/output-queue)

Additional Notes:

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.

Changing a Remote Output Queue (RMTOUTQ) Description

After a Remote Output Queue (RMTOUTQ) has been configured, there is no need to delete and recreate the RMTOUTQ to make any changes. The RMTOUTQ description can be changed by doing the following:

1.Use the End Writer (ENDWTR) command with the When to end writer (OPTION) parameter set to *IMMED to end the writer immediately.
2.Use the Work with OUTQ Description (WRKOUTQD) command to display the RMTOUTQ's current settings.
3.Verify that the status shows that a writer is not active to this output queue.
4.Press the F13 (Change) Key to run the Change Output Queue (CHGOUTQ) command.
5.Make the desired changes to the RMTOUTQ description. Press the Enter key or the F16 (Command complete) key when finished.

Note: The F9 (All parameters) and Page Down keys can be used to get to all of the desired parameters.
6.If needed, use the Start Remote Writer (STRRMTWTR) command to restart the writer.

References

For more information on Remote Output Queues (RMTOUTQs), refer to the following Rochester Support Center knowledgebase documents:

N1019443: Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer
N1010172: Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)
N1019659: Capabilities and Limitations of Remote Output Queues (RMTOUTQs)
N1019713: Using Host Print Transform (HPT) with a Remote Output Queue (RMTOUTQ)
N1010256: Creating a Dummy Device Description to Use with a Remote Output Queue (RMTOUTQ)
N1010092: Controlling the TCP/IP Trailer Page Using the Print Separator Page (SEPPAGE) Parameter
N1019582: Getting Support for Form Types in a RMTOUTQ
N1019620: Forcing a Remote Output Queue (RMTOUTQ) to Select a Particular Paper Size
N1019605: Information on Printers from Various Manufacturers
N1019698: Printer Model Settings for Host Print Transform (HPT)

The TSPRWPR exit program allows a user to print a specific page range when using a remote output queue (RMTOUTQ) that is configured with a connection type of *IP or when using the Send TCP/IP Spooled File (SNDTCPSPLF or LPR) command. For more information on the unsupported TSPRWPR remote writer page range support exit program, refer to the following document:

N1019686: TSPRWPR Remote Writer Page Range Support Exit Program

The TSPLPRD exit program is an unsupported utility that can be used to configure a *LAN 3812 printer device description to send spooled files to an ASCII printer using LPR/LPD. RMTOUTQs also send using LPR/LPD, but the TSPLPRD exit program uses a printer writer, rather than a remote writer. For more information on the unsupported TSPLPRD LPR print driver exit program, refer to the following documents:

N1019586: Configuring a *LAN 3812 Device Description that Uses the LPR Print Driver (TSPLPRD) Exit Program
N1019586: Configuring a *LAN 3812 Device Description that Uses the LPR Print Driver (TSPLPRD) Exit Program

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

24291009

Document Information

Modified date:
18 December 2019

UID

nas8N1019443