Resolving The Problem
This document contains information on configuring *LAN 3812 PJL device descriptions for LAN attached ASCII printers. The term PJL refers to HP's Printer Job Language. PJL allows for two-way communications with the printer when attached to the LAN using a print server that also supports bidirectional PJL. Support for the PJL print driver is available in the base code for the R410 operating system and above, and was added to the R370 operating system through PTFs. This is an alternative to using Remote Output Queues (RMTOUTQs). *LAN 3812 PJL device descriptions fully support the page range function.
Support for the PJL print driver is largely dependent on the internal network interface card (NIC) or external print server used with the printer. Therefore, this column is as much of a statement about the NIC card or print server typically shipped with the printer, than it is about the printer itself. If it is unclear whether the network interface card (NIC) or print server and/or printer supports PJL, contact the manufacturer.
This video shows how to create a PJL printer device description.
There is no guarantee that printers that support Remote Output Queues (RMTOUTQs) will also support PJL (or vice versa). In order for a *LAN PJL device description to work, the following hardware requirements must be met:
- The printer connected via this print driver must support the HP PJL (Print Job Language) protocol.
- If the printer is connected to a network adapter, the adapter must be compatible with the printer, it must provide bi-directional communication with the printer, and it must also pass all of the HP PJL commands to and from the printer untouched. Note: Consult the manufacturer of the adapter to determine if it supports the printer, since some network adapters do not support all printers.
- If the printer is connected to an external network adapter, it must be connected using an IEEE 1284, bi-directional printer cable, and the print server must be in BITRONICS, BI-DIRECTIONAL or ECP/MLC mode Many printers from a variety of manufacturers support PJL, including many models of IBM Network Printer, IBM Infoprint printers, HP LaserJet printers, and Lexmark Optra printers. For a list of known printers that support PJL, refer to Information on Printers from Various Manufacturers.
There are no required PTFs in order to print using a *LAN 3812 PJL device description, but getting the latest Print Group PTF will typically help you avoid problems:
|PTF Number||Licensed Program||Version||Description|
|SF99366||5770SS1||V7R1M0||710 Print Group PTF for V7R1M0|
|SF99356||5761SS1||V6R1M0||610 Print Group PTF for V6R1M0|
|SF99347||5722SS1||V5R4M0||540 Print Group PTF for V5R4M0|
|SF99346||5722SS1||V5R3M0||530 Print Group PTF for V5R3M0|
|SF99345||5722SS1||V5R2M0||520 Print Group PTF for V5R2M0|
To configure such devices, use the CRTDEVPRT command. Specify the following parameters:
|Parameter||Recommended Setting and Usage|
|Device Class (DEVCLS)||This needs to be set to *LAN.|
|Device Type (TYPE)||This needs to be set to 3812.|
|Device Model (MODEL)||This needs to be set to 1.|
|LAN Attachment (LANATTACH)||This needs to be set to *IP.|
|Port number (PORT)||This specifies the port number that the LAN-attached printer or LAN print server is expecting for PJL (or Reverse TELNET) data. The port number is hardware specific, but is typically set to one of the following:
9100 for HP LaserJets, Lexmark Optras, and IBM/Lexmark 4039s and 4049s. 9100, 9101 or 9102 for HP LaserJet or compatible printers that are connected to an external HP JetDirect print server (9100 is for parallel port 1, 9101 is for parallel port 2 and 9102 is for parallel port 3). 2501 for IBM Network Printer 12, 17 and 24 (4312, 4317 and 4324) and IBM Infoprint 20, 32 and 40 (4320, 4232 and 4340).For a complete list of known PJL port number and system driver program values, refer to the following Rochester Support Center knowledgebase document: N1019689: Recommended PJL Port Number Values for *LAN 3812 PJL Device Descriptions If this document does not list a PJL port number value for your printer hardware, consult the manufacturer of your printer and/or print server to determine if they have a dedicated port that accepts HP PJL commands. If they provide you with a PJL port number value that works, contact the Rochester Support Center at 1-800-IBM-SERV so this information can be added to our documentation.
|Font (FONT)||This is typically set to 011, which is the default 10 CPI font. A font ID is required to create the device description. Unless special requirement in your operation dictate something different, this should suffice.|
|Form Feed (FORMFEED)||This defaults to *TYPE, but should be set to *AUTOCUT to indicate that the printer automatically feeds cut sheet paper. Leaving this set at *TYPE or setting it to *CONT or *CUT can cause problems with both drawer selection and paper size.|
|Printer Error Message (PRTERRMSG)||This defaults to *INQ. For the R410 operating system and above, this should be set to *INFO so the printer's message queue will receive informational messages whenever possible. If this is set to *INQ and a problem occurs on the printer (for example, out of forms or a paper jam) a message will be sent to the printer's message queue that must be answered before printing can continue. Often, this can also cause the writer to end while in the middle of a spooled file.|
|Message queue (MSGQ)||This defaults to *CTLD, which indicates the message queue defined in the attached controller. There is no attached controller for *LAN printer device descriptions, so leaving the Message queue (MSGQ) parameter set to *CTLD will in effect set it to the QSYSOPR message queue in library QSYS. If another message queue is to be used for this particular printer device, verify that the message queue exists before entering the message queue and library in the MSGQ parameter. Otherwise, the CRTDEVPRT 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 Printer Writer (STRPRTWTR) command defaults to *OUTQ, which means that writer messages are sent to the message queue specified in the MSGQ parameter in the printer device description. Another message queue can be specified when using the STRPRTWTR command to start a printer writer, or the message queue can be changed after the printer writer has been started by using the Change Writer (CHGWTR) command.
|Activation Timer (ACTTMR)||This defaults to 170 (seconds) but can be set to any value from 1 to 2550 seconds (or 42.5 minutes). The activation timer refers to the amount of time to wait for the LAN-attached printer device to respond. The printer device is considered not available, and an error message is posted if there is no connection before this timer expires.|
|Inactivity Timer (INACTTMR)||This defaults to *ATTACH, but can be set to any value from 1 to 30 (minutes), as well as *SEC15 (15 seconds), *SEC30 (30 seconds) or *NOMAX (no maximum). This value determines when the print driver closes the connection to the printer (freeing it up to received spooled output from another source) once there are no operating system spooled files left in RDY (ready) status. It is recommended that this be set to *SEC15 so the operating system will free up the printer 15 seconds after all RDY spooled files have been processed. Setting it to *NOMAX will cause the operating system to maintain the connection until the writer is ended so the printer device will not be shared with other systems. For *LAN printer device descriptions, *ATTACH maps to the recommended value of *SEC15.|
|Host Print Transform (TRANSFORM)||This needs to be set to *YES so the Host Print Transform (HPT) function on the operating system will convert SCS and AFPDS spooled files to the printer's data stream.|
|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 recommendations on the value to use for certain known printers, please refer to the following document: N1019605: Information on Printers from Various Manufacturers|
|Paper source 1 (PPRSRC1) and Paper source 2 (PPRSRC2)||These parameters indicate the paper size used in paper source 1 and paper source 2 in the printer hardware. The default value is *MFRTYPMDL, which indicates that the paper size will be determined based on the default paper size for the Manufacturer type and model (MFRTYPMDL) setting selected. Other choices for the PPRSRC1 and PPRSRC2 parameters include the following:
Note: *LAN 3812 PJL device descriptions typically are used only for cut-sheet feed printers, so *CONT80 and *CONT132 will rarely be specified for the PPRSRC1 or PPRSRC2 parameters when configuring a *LAN 3812 PJL device description.
|Remote Location (RMTLOCNAME)||This should be set to the IP address of the printer, host name, or DNS name. If an IP address is used, it should be entered without leading zeros (for example, use 126.96.36.199 rather than 192.186.010.002). If an IP address is used, verify that the operating system can reach the printer by using either the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that IP address. If a host name or DNS name is used, verify that operating system can reach the printer by using either the PING or Verify TCP/IP Connection (VFYTCPCNN) command with that host name or DNS name.|
|User-defined options (USRDFNOPT)||This defaults to *NONE. For R370 OS/400, the first User-Defined Options (USRDFNOPT) parameter should be set to ERRMSGINFO so the message queue for the printer will receive informational messages whenever possible. If this is not set and a problem occurs on the printer (for example, out of forms or a paper jam), a message will be sent to the message queue for the printer that must be answered before printing can continue. Often, this can also cause the writer to end while in the middle of a spooled file.|
|System Driver Program (SYSDRVPGM)||Specifies the name of a system-defined driver program, which provides the capability to send operating system printer output to a printer attached over a TCP/IP network. This should be set to either *IBMPJLDRV or *HPPJLDRV when configuring a *LAN 3812 PJL device description for a printer that is directly attached to the LAN.|
|Workstation Customizing Object (WSCST)||
This is typically set to *NONE, but can be used to specify a modified Workstation Customizing Object (WSCST).
|Text 'description' (TEXT)||
Specifies the text that briefly describes the printer device description. This text can be seen when working with printer device descriptions when using the Work with Device Descriptions (WRKDEVD) command.
Note: All other parameters should be specified like any other printer.
To configure a *LAN 3812 PJL device description for an IBM Infoprint 1140 printer, type CRTDEVPRT and press the F4 (Prompt) key. The following is an example of using the Create Device Printer (CRTDEVPRT) command to create a *LAN 3812 PJL device description:
CRTDEVPRT DEVD(IP1140PJL) DEVCLS(*LAN) TYPE(3812) MODEL(1) LANATTACH(*IP) PORT(9100)
FONT(011) FORMFEED(*AUTOCUT) PRTERRMSG(*INFO) MSGQ(QSYSOPR) INACTTMR(*SEC15) PARITY(*NONE)
STOPBITS(1) TRANSFORM(*YES) MFRTYPMDL(*LEXOPTRAT) RMTLOCNAME('188.8.131.52') SYSDRVPGM(*IBMPJLDRV)
Once you have created the printer device description, you will need to vary on the printer device description using either the Vary Configuration (VRYCFG) or Work with Configuration Status (WRKCFGSTS) command and then start the printer writer using either the Start Printer Writer (STRPRTWTR) or Work with Writers (WRKWTR) command.
The success of *LAN 3812 PJL device descriptions is dependent on the configuration settings in operating system and on the printer and print server hardware. For more information about configuring the timeout values on the printer and print server hardware and common error messages that you can receive when printing through a *LAN 3812 PJL device description, refer to Configuration Settings and Error Messages for *LAN 3812 PJL Device Descriptions.
Was this topic helpful?
03 November 2021