IBM Support

Using the Send TCP/IP Spooled File (SNDTCPSPLF) Command to Send a Spooled File

Troubleshooting


Problem

This document provides information on using the Send TCP/IP Spooled File (SNDTCPSPLF) command to send an i5/OS spooled file to a network printer, to a remote system, or to an output queue on the same IBM i system.

Resolving The Problem

This document provides information on using the Send TCP/IP Spooled File (SNDTCPSPLF) command to send an i5/OS spooled file to a network printer, to a remote system, or to an output queue on the same IBM i system.

This document was last updated on 5 October 2012.

SNDTCPSPLF Overview

The Send TCP/IP Spooled File (SNDTCPSPLF) command can be used to:

oA printer that is attached to the LAN/WAN using an internal print server or NIC card,
oA printer that is attached to the LAN/WAN using an external print server (typically attached via a parallel or USB port),
oAnother IBM System i,
oAnother logical partition or LPAR on the same IBM System i,
oAnother output queue on the same IBM System i or LPAR,
oA 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 the SNDTCPSPLF 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 enabled 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.
Notes:
oRemote Output Queues (RMTOUTQs) that have the Connection type (CNNTYPE) parameter set to *IP use the Send TCP/IP Spooled File (SNDTCPSPLF) command to send spooled file to a network printer, to a remote system, or to an output queue on the same IBM i system. They can be a convenient way to automatically send spooled files to the same destination.

For more information on configuring a Remote Output Queue (RMTOUTQ) rather than sending spooled files using the SNDTCPSPLF command, refer to the following documents:

New, Configuring a Remote Output Queue (RMTOUTQ): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ)'
New, Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer'
New, Configuring a Remote Output Queue (RMTOUTQ) to a Windows Print Queue: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ) to a Windows Print Queue'
New, Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD'
oThe Basic Operations > Printer Output, Basic Operations > Printers, and Work Management > Output Queues containers within System i Navigator allow users to drag and drop spooled files from one printer or output queue to another printer or output queue on the same IBM i system, or to another printer or output queue on another IBM i system or partition (LPAR). System i Navigator uses the Send TCP/IP Spooled File (SNDTCPSPLF) command internally to send a copy of the spooled file to the destination printer or output queue.



SNDTCPSPLF Parameters

SNDTCPSPLF Parameters

Remote Output Queues (RMTOUTQs) that have the Connection type (CNNTYPE) parameter set to *IP use the Send TCP/IP Spooled File (SNDTCPSPLF) command to send spooled file to a network printer, to a remote system, or to an output queue on the same IBM i system. As a result, many of the parameters used to create a RMTOUTQ are also used when sending a single spooled file using the Send TCP/IP Spooled File (SNDTCPSPLF) command.

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) i5/OS and R610 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, reference APAR SE33021, OSP-TCP ADD IPV6 ADDRESS SUPPORT TO LPR, Database 'DCF Technotes (IBM i)', View 'Products', Document 'Digital Certificate Manager, Getting Started'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD'.

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.

Printer Queue (PRTQ)
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 Printer Queue (PRTQ) parameter, refer to the following document:

New, Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'

Note: If the PRTQ parameter is not set to correct LPR queue name, or if it is specified in the wrong case, then the SNDTCPSPLF command will be unable to connect to the Windows PC or server.

Spooled file (FILE)
Specifies the spooled file that is sent to the specified system and printer. The file name is the same file name that is displayed with the Work with Spooled File (WRKSPLF) command.

Job name (JOB)
Specifies the job that created the spooled file that is to be sent. This parameter defaults to '*', which indicates the job that is running the SNDTCPSPLF command.

Spooled file number (SPLNBR)
Specifies the number of the spooled file from the job whose data records are to be sent. This parameter defaults to *ONLY, which indicates the only one spooled file from the job has the specified spooled file name. A value of *LAST indicates that the spooled file with the highest number and the specified file name will be sent. Otherwise, specify a spooled file number, which has a range between 1 and 999999.

Job system name (JOBSYSNAME)
Specifies the system from which the job that created the spooled file was ran on. This parameter defaults to *ONLY, but can be sent to *CURRENT or a specific system name.

Spooled file created (CRTDATE)
Specifies the date the spooled file was created on the system. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, and job system name parameter requirements have been met.

Note: The Spooled file (FILE), Job name (JOB), Spooled file number (SPLNBR), Job system name (JOBSYSNAME), and Spooled file created (CRTDATE) parameters are used to uniquely identify the spooled file that is to be sent.

Destination Type (DESTTYPE)
Specifies the type of destination system to which the spooled file is being sent. This information allows the SNDTCPSPLF command to send the file in a format that is most likely to be received and processed correctly on the destination system. When sending to a network printer or print server, this parameter should be set to *OTHER. When sending to an IBM i system or partition (LPAR), this parameter should be *AS400.

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, refer to the following document:

New, TSPRWPR Remote Writer Page Range Support Exit Program: Database 'DCF Technotes (IBM i)', View 'Products', Document 'TSPRWPR Remote Writer Page Range Support Exit Program'Database 'DCF Technotes (IBM i)', View 'Products', Document 'TSPRWPR Remote Writer Page Range Support Exit Program'

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, refer to the following document:

New, Information on Printers from Various Manufacturers: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Information on Printers from Various Manufacturers'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Information on Printers from Various Manufacturers'Database 'DCF Technotes (IBM i)', View 'Products', Document '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, refer to the following Rochester Support Center knowledgebase documents:

New, Forcing a Remote Output Queue (RMTOUTQ) to Select a Particular Paper Size: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Forcing a Remote Output Queue (RMTOUTQ) to Select a Particular Paper Size'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Forcing a Remote Output Queue (RMTOUTQ) to Select a Particular Paper Size'
New, Printer Model Settings for Host Print Transform (HPT): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Printer Model Settings for Host Print Transform (HPT)'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Printer Model Settings for Host Print Transform (HPT)'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Printer Model Settings for Host Print Transform (HPT)'

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 V4R3 (R430) or earlier versions of OS/400 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 OS/400 or i5/OS 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 OS/400 spooled files could stay in SND status indefinitely.

Note: The XAUTOQ processing is done automatically at R440 OS/400 and above. Therefore, XAUTOQ must be specified when using V4R3 (R430) 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.
SNDTCPSPLF Examples

SNDTCPSPLF Examples

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 document New (Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'Database 'DCF Technotes (IBM i)', View 'Products', Document '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
Host print transform . . . . . . > *YES          *YES, *NO
Manufacturer type and model  . . >
Press F4 (Prompt) or refer to document New (Database 'DCF Technotes (IBM i)', View 'Products', Document 'Information on Printers from Various Manufacturers'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Information on Printers from Various Manufacturers'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Information on Printers from Various Manufacturers')
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".


sends a spooled file to be printed on a remote system. The remote system must be running TCP/IP and must have Line Printer Daemon (LPD) enabled. The SNDTCPSPLF command is the iSeries version of
the TCP/IP LPR (Line Printer Requester) command.

For More Information (References)

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

New, Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'Database 'DCF Technotes (IBM i)', View 'Products', Document 'Recommended Remote Printer Queue Values for Remote Output Queues (RMTOUTQs)'

For information on troubleshooting problems printing spooled files using the Send TCP/IP Spooled File (SNDTCPSPLF or LPR) command, as well as a Remote Output Queue (RMTOUTQ), refer to the following document:

New, Configuration Settings and Error Messages for Remote Output Queues (RMTOUTQs): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuration Settings and Error Messages for Remote Output Queues (RMTOUTQs)'

For more information on configuring a Remote Output Queue (RMTOUTQ) rather than sending spooled files using the SNDTCPSPLF command, refer to the following documents:

New, Configuring a Remote Output Queue (RMTOUTQ): Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ)'
New, Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ) to a Label or Receipt Printer'
New, Configuring a Remote Output Queue (RMTOUTQ) to a Windows Print Queue: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a Remote Output Queue (RMTOUTQ) to a Windows Print Queue'
New, Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD: Database 'DCF Technotes (IBM i)', View 'Products', Document 'Configuring a RMTOUTQ to Send SPLFs from one IBM System i to Another using LPR/LPD'

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

Historical Number

647961196

Document Information

Modified date:
18 December 2019

UID

nas8N1010750