Connecting a TCP/IP-Attached IPDS Printer in OS/400 V3R1
[Back to Products]

About this document

This document describes how to configure an AS/400 to print AFP/IPDS data to a TCP/IP attached printer. 

System requirements

- OS/400 V3R1M0

- Latest cumulative PTF

- PSF/400

- TCP/IP must be loaded

It is important that you use the latest cumulative PTF which includes the command interface called WRKAFP2. This document describes WRKAFP2 and the parameters used by the command to provide an interface to QPQXWAFP which is the program to process the command.

The PTF also includes QSYS/QPQXWAFP, that provides an interface to a data area used by PSF/400 to obtain additional configuration information not provided through use of the native CRTDEVPRT command. QPQXWAFP creates a data area in library QGPL with authority of *LIBCRTAUT.

How to install WRKAFP2

These instructions assume you have a source physical file named QCLSRC.

Step: Command:

1 WRKMBRPDM QGPL/QCMDSRC

2 Press F6 to create a new member. Name it WRKAFP2 and the type is CMD. Give it a meaningful description. Press Enter.

3 You now have the SEU edit screen. Press F15 to Browse/Copy member.

4 Select:

Selection: 1 = Member

Copy all records: N

Member: QSF24144

File: QAPZCOVER

Library: QGPL

Press Enter. This should give you a split screen.

5 At the command line for the screen type F WRKAFP2: CMD and press Enter. After the character string is located, press F16 two times. You will see a line that begins "WRKAFP2: CMD". Type a CC in the control space(line no.) at the beginning of the line.

6 Now go to the end of the program. Type B at the command line to go to the end of the member. Type a CC in that line.

7 Move the cursor back to the new member you are creating and type an "A" at the first line. Press Enter.

8 Press F12 to end the split screen. F3 to end the edit session and Enter to save the new source.

9 You must now compile the command. It can be compile by entering the following command:

CRTCMD CMD(QGPL/WRKAFP2)PGM(QSYS/QPQXWAFP) SRCFILE(QGPL/QCMDSRC)

After the command has been successfully compiled, you are ready to use the WRKAFP2 command. In order that the values specified with WRKAFP2 take effect, they must be entered before you activate PSF/400. Therefore your procedure should be as follows.

1. End PSF/400 (ENDWTR), if it is active.

2. Use WRKAFP2 to set the values.

3. Start PSF/400 (STRPRTWTR).

Values specified with WRKAFP2 take effect only after PSF/400 is started (STRPRTWTR).

WRKAFP2 parameters

For WRKAFP2 the following parameters are available:

DEVD Printer device name.

This is the name of the data area to be created, modified or migrated by WRKAFP2. The value may be any name permitted for a data area.

PRINTONLY Print data area only.

Use a value of *YES if you wish to print the contents of a data area previously created by WRKAFP2. Valid values are *YES and *NO. When *YES is specified, all other parameters are ignored. The default value is *NO.

IPDSPASTHR IPDS pass through.

Specifies if you are using PSF/400's IPDS Passthrough function. You may use this function when printing on any connection: Twinaxial, APPC and TCP/IP. Valid values are *YES and *NO. The default value is *NO.

TCPIP TCP/IP.

Specifies if you are attaching to a device which requires PSF/400's TCP/IP support. Valid values are *YES and *NO. If you specify *YES, you will have to specify values for RMTSYS and PORT; see below. The default value is *NO.

RMTSYS Remote system.

Specifies the remote system name of the printer. You may use either a host name or an IP address.

PORT Port.

Specifies the port number for the device. Valid values range from 1­65535.

ACTTMR Activation timer.

Specifies the number of seconds PSF/400 will wait for a printer to respond to an activation request. If the printer does not respond within this time, PSF/400 terminates. The value specified depends on what is required in your environment. The value you select is dependent on whether you are sharing the printer with another PSF, or the length of time required for an activation request to reach the printer. This parameter is used only for TCP/IP­attached printers. Acceptable values are 1­2550 seconds and *NOMAX (wait forever). The default value is 170.

RETRY SNA retry count.

Specifies the number of retries PSF/400 should attempt when trying to establish a session with a device. RETRY may be used for devices attached by APPC. This value is ignored for Twinax and TCP/IP. This parameter is designed for use with PSF Direct. If you are sharing a PSF Direct­attached printer with another PSF, then you may want to give consideration to how this value should be set. Valid values are 1­99 and *NOMAX (try forever). The default value is 2.

RETRYDLY Delay time between SNA retries.

Specifies the number of seconds to wait between retry attempts to establish a session. This parameter applies to APPC­configured printers only. This parameter only applies if the RETRY parameter has a value greater than 0. This parameter is designed for use with PSF Direct. If you are sharing a PSF Direct­attached printer with another PSF, then you may want to give consideration to how this value should be set. Valid values are 0 ­999 seconds. The default value is 0.

INACTTMR Inactivity timer.

Specifies the length of time PSF/400 will maintain a session with the printer while there are no spooled files with a status of RDY. If the specified time elapses, PSF/400 closes the connection with the printer, which permits another PSF to use the printer. This parameter is used for APPC­ and TCP/IP­attached printers only. Valid values are 1­30 minutes, *NOMAX (never close the connection), *SEC15 (15 seconds) and *SEC30 (30 seconds). The default value is *NOMAX.

The remaining four parameters have already been made available by setting values in a data area accessed by PSF/400. They are also made available through WRKAFP2.

SBP Suppress blank pages.

Specifies that PSF/400 does not issue a blank page after every separator page and spool file copy that contains an odd number of pages. This parameter is used for the 3835 and 3900 printers only. Valid values are *YES and *NO. The default value is *NO.

PSC Page size control.

Specifies whether PSF/400 sets the page size (forms) in the printer. This parameter only applies to the 4224, 4230, 4234, 4028, 6404, 6408, and 6412 printers. Valid values are *YES and *NO. If *YES is specified, the page size in the spooled file overrides the printer's configuration. The defaulvalue is *NO.

DRF Disable resident fonts.

Specifies whether PSF/400 does not support the resident fonts on a printer that has resident fonts. If *YES is specified, PSF/400 will map resident font references to the equivalent host font and then download the host font to the printer. Valid values are *YES and *NO. The default value is *NO.

DRR Disable resource retention.

Specifies if PSF/400 should delete page segments and overlays from the printer after printing a spooled file which references page segments and overlays. Valid values are *YES and *NO. The default value is *NO.

Examples for using WRKAFP2

This section gives some examples of how to use WRKAFP2 for different printing requirements. The term printer is used for an OnePrint port configure as a TCP/IP attached printer.

Example 1:

Configure PSF/400 to use IPDS Passthrough for a Twinax attached printer.

WRKAFP2 DEVD(PRT3112) IPDSPASTHR(*YES)

Changes to the printer device description are not required.

Note that IPDSPASTHR(*YES) may be specified when printing on any connection: Twinaxial, APPC and TCP/IP.

Example 2:

Configure PSF/400 to attach to a TCP/IP attached printer.

WRKAFP2 DEVD(PRT3130) TCPIP(*YES) RMTSYS('9.5.12.102') PORT(5001)

Example 3:

Configure PSF/400 on two or more AS/400s to share a TCP/IP attached printer. The following command must be issued on each AS/400:

WRKAFP2 DEVD(PRT3130) TCPIP(*YES) RMTSYS('9.99.12.112')

PORT(5001) ACTTMR(*NOMAX) INACTTMR(5)

This definition configures PSF/400 to wait forever ACTTMR(*NOMAX) to establish a connection with a printer. After making a connection, if there are no spooled files with a status of RDY on the output queue in use by PSF/400 after 5 minutes, INACTTMR(5), then the connection with the printer is ended. PSF/400, however, will not end. As soon as a spooled file becomes RDY, PSF/400 will again attempt to make a connection with the printer. The value specified for ACTTMR affect the length of time for which PSF/400 attempts to make a connection with the printer.

Note that while one AS/400 is printing, one or more AS/400s may be attempting to make a connection. As soon as an AS/400 ends the connection to a printer, another AS/400 can get a connection to the printer.

Example 4:

Using WRKAFP2 to configure PSF/400 on two or more AS/400s to share a printer attached through the PSF Direct function provided by PSF/2 and PSF/6000.

WRKAFP2 DEVD(PSFD3900) RETRY(*NOMAX) RETRYDLY(60) INACTTMR(*SEC30)

This definition configures PSF/400 to make an infinite number of attempts, RETRY(*NOMAX), to establish a connection with PSF/2 or PSF/6000. PSF/400 will pause 60 seconds, RETRYDLY(60), between each attempt to establish a connection. After making a connection, if there are no spooled files with a status of RDY on the output queue in use by PSF/400 after 30 seconds, INACTTMR(*SEC30), then the connection with the printer is ended. However, PSF/400 will not end. As soon as a spooled file becomes RDY, PSF/400 will attempt to make a connection with the printer. The values specified for RETRY and RETRYDLY affect the length of time for which PSF/400 attempts to again make a connection with the printer.

Note that while one AS/400 is printing, one or more AS/400s may be attempting to make a connection. As soon as an AS/400 ends the connection to a printer, another AS/400 can get a connection to the printer.

Changes to the printer device description are not required.

What to do before printing

This section describes the steps to verify that PSF/400 will be able to connect to the printer.

1. Vary on the line description, VRYCFG CFGTYPE(*LIN), to be used, if it is not already varied on.

2. Vary on the printer device description, VRYCFG CFGTYPE(*DEV), to be used, if it is not already active.

3. Make the TCP/IP interface to be used active, if it is not already active.

4. Make certain that the printer has been successfully booted and is ready.

5. Issue the PING command to verify that the printer can be contacted from your AS/400. Using the IP address from the above example, you would enter PING RMTSYS('9.99.12.128'). If the device cannot be PINGed, then you may have a configuration error, a network problem (such as a duplicate IP address) or a hardware error (cable, etc.).

6. After the device has been successfully PINGed, you may start PSF/400 using the STRPRTWTR command.

Data area migration concerns

You may already be using a data area to control some aspects of AFP printing. WRKAFP2 will automatically migrate that data area to the new one required to configure for the above­mentioned new functions. This is necessary if the existing data area is not of the correct size.

A data area will be migrated if the following conditions exist:

- The data area specified for DEVD in WRKAFP2 exists in library QGPL.

- The first eight bytes of the data area are set to WWPDTRHR.

The migration performed by WRKAFP2 involves the following steps:

- Save the value stored within the existing data area.

- Delete the existing data area.

- Create a new data area of the correct size.

- Copy the values from the old data area to the new data area.

- Add any new values you have specified to the new data area.

Important notes

Keep alive parameter :

If your environment has a need to make certain that a TCP/IP­attached device has not been powered off, you may use the TCP keep alive parameter in CHGTCPA. The value used for this parameter determines how long PSF/400 will wait for a response from a device before terminating.

Printer sharing :

PSF/400 may share the printer with PSF/2 and PSF/6000. A maximum of 3 PSFs can share a printer when TCP/IP is used.

Message file :

PSF/400 will automatically update message file QSYS/QPQMSGF and alert table QSYS/QPQMSGF with new messages. Messages will be updated with English text and be in upper case. New inquiry messages will require a reply in upper case.

Setsockopt :

For performance purposes, PSF/400 uses the setsockopt socket function to set the size of the TCP send buffer used by PSF to 32768. This value is not configurable.

MTU sizes :

Best performance is obtained by configuring both AS/400 and the printer for as large an MTU as possible. If you are using a 4M Token Ring line, configure the MAXFRAME parameter in the line description and the MTU in the corresponding TCP/IP interface for 4060. If you are using a 16M Token Ring line, you may set the MAXFRAME and MTU for 4096.  

If data from your AS/400 goes through one or more routers to get to a printer, OS/400 TCP support will use an MTU of 576. An MTU of this size may negatively impact printer performance. 

Problem determination

This section describes some error situations that may occur when you are preparing to use PSF/400's TCP/IP support. This section does not describe all the possible error situations that may occur. When necessary, please refer to the appropriate IBM publications.

Cannot PING the printer

1. The OnePrint is not powered on.

2. You are PINGing the wrong IP address.

3. The OnePrint has the same IP address as another device in your network.

AS/400 PING command does not work

1. The AS/400 TCP/IP support has not been started. Issue the STRTCP CL command to start AS/400 TCP/IP support.

2. The TCP/IP interface for your line description has not been started. Use the STRTCPIFC CL command, or work your way through the menu provided by using the CFGTCP CL command, to start the TCP/IP interface for the Token Ring or Ethernet line description you are using.

PSF/400 fails to start

1. You did not configure PSF/400 for TCP/IP support. Use the WRKAFP2 command to configure PSF/400 for TCP/IP.

 
PRODUCTS
 
Main 972-769-1900 | Fax 972-769-2800 | Toll Free 1-800-873-0900
Integrated Print Solutions, LC | Plano, Texas - USA
 
Copyright 2016 IPS, LC | Disclaimers and Copyright Notice | Site Map