IBM Support

Configuring a Remote Output Queue (RMTOUTQ)

Troubleshooting


Problem

This document contains information on configuring and using a Remote Output Queue (RMTOUTQ) for sending spooled files to an output queue on another IBM System i system or to print spooled files to printers that are attached to the LAN/WAN using a print server, a PC, or a Unix server.

Resolving The Problem

This document contains information on configuring a Remote Output Queue (RMTOUTQ) to send spooled files via TCP/IP to one of the following:
 
o A printer that is attached to the LAN/WAN using an internal print server or NIC card,
o A printer that is attached to the LAN/WAN using an external print server (typically attached via a parallel or USB port),
o Another IBM System i,
o Another logical partition or LPAR on the same IBM System i,
o Another output queue on the same IBM System i or LPAR,
o A remote host other than an IBM System i, such as a Windows or Linux PC, a Mac OS X system, a UNIX server, or an IBM System z or IBM S/390 mainframe.

Requirements for using a Remote Output Queue (RMTOUTQ) include the following:
 
o Having a TCP/IP interface configured and started on the IBM System i,
o Having a TCP/IP address assigned to the printer or remote host,
o Having a Line Print Daemon (LPD) TCP/IP process enable and running on the internal or external print server or remote host, and
o Either 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.
 

For detailed information on configuring a Remote Output Queue (RMTOUTQ) to print to a thermal label or receipt printer, please refer to the following document:

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:
 
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:
 
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:
   


Creating a Remote Output Queue

This video shows how to create a Remote Output Queue (RMTOUTQ) for a LAN attached printer.



 
  • - 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:

  • - 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:


    Remote System (RMTSYS)
    When configuring a RMTOUTQ, you can specify the host name or DNS name for the internal or external print server, Windows or Linux PC, UNIX server, or other types of systems that support LPR/LPD such as an IBM System z mainframe. If a TCP/IP address is used, the Remote System (RMTSYS) parameter should be set to *INTNETADR and then the printer's TCP/IP address 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 entered in the Remote System (RMTSYS) parameter.

    V6R1M0 (R610) IBMi and 6.1 PTF SI31363 (8365) added support to allow the Remote system (RMTSYS) parameter to specify an IPv4 or IPv6 address, in addition to specifying a host name or DNS name. Prior to this, the RMTSYS parameter would need to be set to *INTNETADR and the IP address would need to be specified in the Internet address (INTNETADR) parameter.

    For more information, please refer to APAR SE33021: OSP-TCP ADD IPV6 ADDRESS SUPPORT TO LPR.

    Note: If a TCP/IP address is used, verify that the operating system can reach the printer by 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 by 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:


    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 will be 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 will have to be started manually using the Start Remote Writer (STRRMTWTR) command.

    Note: If configuring a dummy device description for use with your RMTOUTQ, the Writers to autostart (AUTOSTRWTR) parameter should initially be set to the default value of *NONE. If the RMTOUTQ has already been configured with AUTOSTRWTR(1), use the End Writer (ENDWTR) command to end the remote writer before creating the dummy device description. Once the RMTOUTQ has been created in library QUSRSYS and the remote writer is ended, use the Create Device Desc (Printer) (CRTDEVPRT) command to create the dummy device description. Then, use the Change Output Queue (CHGOUTQ) command to set the AUTOSTRWTR parameter to 1; for example, CHGOUTQ OUTQ(LANPRT01) AUTOSTRWTR(1). This ensures that the printer device description is fully associated with the output queue. Otherwise, the Work with Spooled Files (WRKSPLF) command may fail to find the spooled files in the RMTOUTQ when the device name is specified in the Print device portion of the Select files for (SELECT) parameter.

    Queue for writer messages (MSGQ)
    This defaults to QSYSOPR in library *LIBL. If another message queue is to be used for this particular RMTOUTQ, verify that the message queue exists before entering the message queue and library in the MSGQ parameter. Otherwise, the CRTOUTQ command will fail with message CPF2799 - Message queue &1 in library &2 not found.

    Note: The Queue for writer messages (MSGQ) parameter on the Start Remote Writer (STRRMTWTR) command defaults to *OUTQ, which means that writer messages are sent to the message queue specified in the MSGQ parameter in the RMTOUTQ. Another message queue can be specified when using the STRRMTWTR command to start a remote writer, or the message queue can be changed after the remote writer has been started by using the Change Writer (CHGWTR) command.

    Connection Type (CNNTYPE)
    This needs to be set to *IP. This indicates that the RMTOUTQ will communicate using TCP/IP.

    Destination Type (DESTTYPE)
    In this particular case, this needs to be set to *OTHER. This should be set to *OTHER when printing spooled files to printers that are attached to the LAN/WAN using an internal or external print server, a Windows or Linux PC, a UNIX server, or other types of systems that support LPR/LPD such as an IBM System z mainframe. The DESTTYPE parameter should be set to *OS400 when sending spooled files from one i5/OS or OS/400 system to another.

    Host Print Transform (TRANSFORM) or Transform SCS to ASCII (TRANSFORM)
    This needs to be set to *YES so the IBMi or IBMi 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:


    User Data Transform and Library (USRDTATFM)
    Specifies the qualified name of a user-defined data program that is 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:


    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:


    Workstation Customizing Object (WSCST)
    This is typically set to *NONE, but can be used to specify a system-supplied or modified workstation customizing object (WSCST).

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

    Destination options (DESTOPT)
    Specifies destination-dependent options. This is typically set to 'XAIX' (all uppercase), unless using IBMi 4.3 (R430) or earlier versions of IBMi in which case it is typically set to 'XAUTOQ XAIX' (all uppercase).

    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. It is recommended to use the XAIX value in the destination options (DESTOPT) parameter, but 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 that start printing the data right away. However, there are some print servers that 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 will cause 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, but the control file will contain multiple print commands. This reduces network traffic, but can only be used with servers which can buffer all the data before knowing how many copies to print. Therefore, without XAIX specified, the print server may or may not print multiple copies of the IBMi or IBMi spooled file.

    The XAUTOQ value specifies that the remote writer is to save the *USERASCII data stream in an LPDxxxxx spooled file whenever the print server, PC or Unix server times out, then the LPDxxxxx spooled file can be sent without further transformation to ASCII once the writer makes another connection to the printer. Without XAUTOQ processing, large IBMi spooled files could stay in SND status indefinitely.

    Note: The XAUTOQ processing is done automatically at IBMi 4.4 and above. Therefore, XAUTOQ must be specified when using IBMi 4.3 or earlier versions of the operating system.

    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, so 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



    The following is an example of a Remote Output Queue (RMTOUTQ) to a LAN attached 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) Key, fill in the following parameters and then press the Enter Key to create the RMTOUTQ:

     
    Output queue . . . . . . . . . . > LANPRT01      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 Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs) document.
    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
    Host print transform . . . . . . > *YES          *YES, *NO
    Manufacturer type and model  . . >
    Press F4 (Prompt) or refer to Information on Printers from Various Manufacturers document.
    Workstation customizing object   > *NONE         Name, *NONE        
      Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB
    Internet address . . . . . . . . >
    Destination TCP/IP Address
    Destination options  . . . . . . > XAIX
    Text 'description' . . . . . . . > 'RMTOUTQ to a LAN Attached Printer'

    Note: Older versions of the operating system may refer to the Host print transform (TRANSFORM) parameter as "Transform SCS
    to ASCII".


  • - 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:
    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(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.


[{"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":"6.1.0"}]

Document Information

Modified date:
03 November 2021

UID

nas8N1010090