Novell is now a part of Micro Focus

Understanding NetWare HostPrint 1.1x

Articles and Tips: article

ROGER MONTALVO
NetWare for SAA Worldwide Customer Support Group
Communication Products Division

01 Apr 1995


NetWare HostPrint is a companion product to Novell's NetWare for SAA software for connecting NetWare LANs to IBM host systems. NetWare HostPrint provides NetWare Loadable Module (NLM)-based IBM 3287 printer emulation. It allows users to send IBM Host print jobs directly to LAN-attached printers via server-based 3270 LU1 or LU3 printer emulation. This Application Note provides a quick reference for understanding and troubleshooting printing with NetWare HostPrint 1.1x.

Related AppNotes Mar 95 "NetWare for SAA 2.0: An Overview of Novell's Next Generation SNA Connectivity Product" Oct 93 "Using NetWare HostPrint for AS/400 Printing"

Introduction

This Application Note is adapted from a training document created with the purpose of clarifying and defining the internal workings of NetWare for SAA HostPrint version 1.1x. This document is a compiled list of notes from the Novell Technical Support Group for the NetWare for SAA and HostPrint products. The information is intended to be used as a quick reference resource for trouble-shooting. You should refer to the sources listed at the end of this AppNote for a complete reference or for more specific information.

All references in this document are for HostPrint version 1.1x. If an aspect is specific to a particular version, the version will be noted.

Some of the conventions used throughout this AppNote are:

  • NetWare 3 refers to NetWare 3.11 or 3.12

  • NetWare 4 refers to NetWare 4.01, 4.02 or 4.1

Note: HostPrint 1.11 is not supported on the NetWare 3.11 platform. Any attempt to do so will result in an error message being displayed.

To understand HostPrint, the Technical Support Specialist must have a clear understanding of NetWare printing, since HostPrint makes extensive use of not only the NetWare printing utilities, but also the NetWare printing environment. With this understanding, I have divided this document into two parts. Part One covers NetWare printing and Part Two covers HostPrint 1.1x. It also includes a discussion of common HostPrint support issues.

Part One: NetWare Printing Overview

Before we can begin to attempt to understand HostPrint, let's take a look a Novell NetWare printing and some of the most commonly used definitions and concepts.

NetWare allows users to send print jobs from a workstation directly to a server-attached printer. NetWare uses a print queue, print server, and printer driver to allow network workstations to share a network printer. Figure 1 shows how the NetWare print services components work together.

Basically, the print server takes print jobs from a print queue and sends them to the printer.

A Print Job is a file stored in a print queue directory waiting to be printed. As soon as a print server prints the job to the printer, the print job is deleted from the queue directory. Each print job is assigned a filename with a variation of the first four digits of the print queue directory ID, four more numerals, and a .Q extension.

A Print Job Description is a group of characteristics that determine how a job is printed. For more information, see the PRINTCON.EXE explanation later in this AppNote.

Figure 1: NetWare print services components.

Print Queue Concepts

A Print Queue is a temporary file created in a network directory to store the print job sent by a workstation. When the printer is ready to be serviced, the print server sends the print job from the print queue to the waiting printer.

In a NetWare 3 bindery-based environment, print queues are located under the SYS:SYSTEM directory, the user SUPERVISOR is assigned as a print queue operator, and the group EVERYONE is assigned as a print queue user.

You must create print queues using PCONSOLE before you set up a print server account. A good rule of thumb is to create a print queue for each printer.

In a NetWare 4 Directory Services environment, the print queue is located in the root directory QUEUES of any selected volume. You are prompted to enter the volume name upon creation of the print queue. The user ADMIN is assigned as a print queue operator and all users in the same context are assigned as print queue users.

To create a print queue in a NetWare 4 environment, you can use PCONSOLE from DOS or NWADMIN from MS Windows to create the necessary objects.

The print queue can hold as many print jobs as disk space allows.

Print Queue Name. In a NetWare 3.12 environment, the print queue is stored in the SYS:SYSTEM\PrintServerID directory. The PrintServerID is the numeric value assigned by NetWare to the Print Server (which can be seen in PCONSOLE). In that directory you will find the files QUEUE.nnn and PRINT.mmm (where .nnn and .mmm are numeric values). Each print queue defined for this print server has a different .nnn value. Each type of printer defined for this print server has a different .mmm value.

Print Queue Operator. A print queue operator is a user who can edit other users' print jobs, delete print jobs from the print queue, modify the print queue status by changing the operator flags, change the order in which the print jobs are serviced, and change the service mode.

Print queue operators are assigned by the user SUPERVISOR in a NetWare 3 environment and by ADMIN in a NetWare 4 environment.

Print Queue Servers (NetWare 3 Only). When you create your print server account, you must assign print queues to the printers you have just defined. This authorizes the print server to take jobs out of the queue and move them to the appropriate printer. The print server can service print queues from as many as eight file servers.

Print Server Concepts

A Print Server is a server that takes print jobs out of a print queue and sends them to a network printer. NetWare print servers can run as PSERVER.NLM on a NetWare server and can service any number of print queues assigned to the printers.

If you want the print server to service queues on multiple file servers, you must create a print server account on each file server (using PCONSOLE).

A print server can support up to 16 printers.

Print Server Operator. These are users who have special privileges (given to them by the SUPERVISOR or ADMIN) to manage the print server. A Print Server Operator has rights to control notify lists, printers, and queue assignments. By default, NetWare assigns the SUPERVISOR (NetWare 3) and the ADMIN (NetWare 4) as Print Server Operators.

Print Server Object (NetWare 4 Only) In NetWare 4, a Print Server Object is a leaf object that represents a network print server.

Printer Driver Concepts

Every network printer requires a printer driver to pass a print job from the network to the printer. The type of driver depends on how the printer is attached to the network. In NetWare, Printer Definition Files (PDFs) are used to issue specific commands to the printer at the beginning of a print request.

Bindery and NetWare Directory Services Differences

The following table summarzes the differences between how printers and print servers are handled by bindery-based NetWare 3 and NDS-based NetWare 4:


Bindery
NetWare Directory Services

Printers area subset of the print server configuration.

Printers areobjects used in conjunction with Print Serverand Print Queue objects.

A print servermust exist before you can define printers.

A print servercan be added, modified or removed independently.

NetWare Printing Utilities

To configure a print server, three utilities are required. These utilities are:

  • PCONSOLE (Print CONSOLE)

  • PRINTDEF (PRINT DEFinition)

  • PRINTCON (PRINT job CONfiguration)

PCONSOLE.EXE. PCONSOLE is used to set up the print server and print queues, to control network printing, and to view information about network printing. PCONSOLE allows you to do the following:

  • Change current file server in a Bindery-based (NetWare 3) environment, or change context in an NDS (NetWare 4) environment.

  • Monitor, edit or create print jobs, print queues, and print queue users and operators.

  • Monitor, edit or create printers and print queue assignments in NDS mode.

  • Monitor, edit or create print servers, printers, and printer assignments.

Figure 2 compares the "Available Options" menu for PCONSOLE in NetWare 3.1x and NetWare 4.x.

Figure 2: PCONSOLE screens for NetWare 3 and NetWare 4.

Hint: In a NetWare 4 environment, the easiest way to create a Print Server, Printer, and Print Queue is to select the Quick Setup option. Choosing this option automatically creates a printer and print queue with the necessary assignments done. It also creates a print server unless one already exists (see Figure 3).

Figure 3: Quick Setup screen.

PRINTDEF.EXE. PRINTDEF is used to set up a database of printer definitions. The information defined in PRINTDEF is used by PRINTCON, NPRINT and CAPTURE to configure print jobs.

PRINTDEF allows you to do the following:

  • View, edit, import or export printer definitions (.PDFs).

  • Create, monitor or edit printer forms to be specified in CAPTURE, NPRINT or PCONSOLE.

  • Set your current context (NDS only).

Figure 4 compares the Available Options menu for PRINTDEF in NetWare 3.x and NetWare 4.x.

Figure 4: PRINTDEF screens for NetWare 3 and NetWare 4.

When you are logged in as SUPERVISOR, running PRINTDEF creates a file named PRINTDEF.DAT in the SYS:MAIL\1 directory on a NetWare 3 server. In a NetWare 4 environment, a file named PRINTJOB.DAT is created in the SYS:PUBLIC directory (if you selected a Public database) or in the SYS:MAIL\USERID (if you selected a Private database).

PRINTCON.EXE. PRINTCON is used to define your preferred print options and set them up as unchanging configuration. This is known as a Print Job Configuration. PRINTCON serves as a "macro" for setting print options to use with CAPTURE, NPRINT and PCONSOLE.

Note: In order to use PRINTCON, you must first set up a database of printer definitions using PRINTDEF.

PRINTCON allows you to do the following:

  • Monitor, edit or create print job configurations

  • Specify what print job configuration will be used when one is not specified in CAPTURE, NPRINT or PCONSOLE

  • Copy print job configuration between users (Bindery only)

  • Change your current user or container object (NDS) or NetWare server (Bindery)

Figure 5 compares the Available Options menu for PRINTCON in NetWare 3.x and NetWare 4.x.

Figure 5: PRINTCON screens for NetWare 3 and NetWare 4.

A print job configuration is a group of characteristics that determine how a job is printed. These characteristics may include the following:

  • Print queue the print job will be sent through

  • Printer the print job will be printed on

  • Number of copies to print (not supported by HostPrint)

  • Use of a banner page (not supported by HostPrint)

  • Printer form to use (not supported by HostPrint)

  • Print device mode (not supported by HostPrint- it uses the parameters in HPDEF.DAT)

Note that in NetWare 4, a print job configuration can also be created using NETADMIN and NWADMIN. For more information, see page 2-25 of the HostPrint Administrator's Guide.

Creating a Print Job Configuration

The procedure for creating a print job configuration with PRINTCON varies slightly from NetWare 3 to NetWare 4. The following sections outline the basic steps involved in each environment.

With NetWare 3

  1. From a workstation , run PCONSOLE to create thePrint Server, Print Queue, Print Server Operators, Print Server Users, and so on.

  2. Run PRINTDEF and select the printer(s) and the form(s) you want to use.

  3. Exit PRINTDEF and run PRINTCON to create the Print Job Configuration.

With NetWare 4

  1. From a workstation, run PCONSOLE to create the Print Server, Print Queue, Print Server Operators, Print ServerUsers, and so on. You can also choose if this will be a PrintServer running under Bindery mode or NDS mode. (The recommendedand easiest way to accomplish this step is to select Quick Setup.)

  2. Run PRINTDEF and select the printer(s) and the form(s) you want to use.

  3. Exit PRINTDEF and run PRINTCON to create the PrintJob Configuration. These print jobs can be in Bindery mode or NDS mode. Under NDS mode they can be either private or public. If it is a private Print Job Configuration, it will be saved in your MAIL directory. If it is a public Print Job Configuration, it will be saved in the volume's SYS:PUBLIC directory with the filename of PRINTJOB.DAT.

Part Two: Understanding NetWare HostPrint

NetWare HostPrint is a software application that provides NetWare Loadable Module (NLM)-based IBM 3287 printer emulation. Working in conjunction with NetWare for SAA, it allows users to send IBM Host print jobs directly to LAN-attached printers via server-based 3270 LU1 or LU3 printer emulation.

LU Definitions

Below is a brief explanation of the differences between LU Type 1 and LU Type 3.

LU Type 1. An LU type 1 device is capable of communicating using the SCS (SNA Character Stream) and IPDS (Intelligent Printer Data Stream) protocols. All printer configuration parameters (MPP, MPL, LPI, and so on) may be included as part of the data, overriding all user-set parameters. If no configuration parameters are included in the data stream, HostPrint applies the user-defined configuration.

Note: For SCS, HostPrint 1.1 does not support Function Management Headers (FMH), Structured Fields, Read Partition Structured Field, or SCS Data Structured Field. Neither HostPrint version 1.0 nor 1.1 supports IPDS.

LU Type 3. An LU Type 3 supports a single printer device that is capable of interpretting SNA 3270 data streams. A session defined as LU Type 3 will utilize the user-configured parameters (MPL, MPP, LPI, and so on).

Figure 6 shows a general view of how a print job flows from the user to the LAN-attached printer.

Figure 6: The print job flow from user to LAN-attached printer.

Installing HostPrint 1.1

The procedures for installing HostPrint 1.1 differ slightly from NetWare 3 to NetWare 4. The following sections outline the basic steps involved in each environment. In either case, HostPrint can be installed from floppy diskettes, a local hard drive, a local NetWare partition, or a remote server.

On NetWare 3 To get HostPrint installed and operational on a NetWare 3 server, follow these steps:

  1. NetWare for SAA (1.2 or 1.3) must already be installed.

  2. On the server with NetWare for SAA installed,type LOAD INSTALL and press <Enter<.

  3. Select Product Options from the menu.

  4. In the list of Currently Installed Products, verify that NWSAA is installed. Press <Ins< to install HostPrint and follow the instructions on the screen.

Note: COMMEXEC must not be running while you are installing HostPrint.

Figure 7: Loading and installing HostPrint 1.1.

On NetWare 4 To get HostPrint installed and operational on a NetWare 4 server, follow these steps:

  1. NetWare for SAA 1.3 must already be installed.

  2. On the server with NetWare for SAA installed, type LOAD INSTALL and press <Enter<.

  3. Select Product Options from the menu.

  4. In the list of Currently Installed Products, verify that NWSAA is installed. Press <Ins< to install HostPrint and follow the instructions on the screen.

How HostPrint Works

As mentioned before, HostPrint is an NLM which allows users to send 3270 Host print jobs to LAN-attached printers. The data is normally sent from the Host in EBCDIC format and sent to the LAN-attached printers in ASCII format.

When a print job is sent from the Host, the SAA gateway receives the data and sends it to the appropriate LU. If the LU is configured as a printer, it will pass the data untouched to HostPrint (or to the emulator) to handle. Once HostPrint receives this data, it analyzes it to determine if it's an LU type 1 or LU type 3 data stream, and sends the data to the EBCDIC Code Page table (ECP Table). At this point the following sequence occurs (see Figure 8):

  • If the data is for an LU type 1 printer, the data is converted from EBCDIC to ASCII (through a single code instruction). If the data includes printer configuration, it is compared with the user configuration and if all parameters are defined, it will overide the HostPrint settings. Once the parameters are in the data stream, they are passed on to NetWare for printing.

  • If the data is for an LU type 3 printer, the data is converted from EBCDIC to Buffer Code and placed in the device buffer. From buffer code, the data is converted to ASCII through the ACP table. HostPrint looks at the user-defined parameters (defined through CSCON) and adds or modifies these parameters in the data stream as required. Once the user parameters are in the data stream, they get sent to NetWare for printing.

Note: SCS control sequences (LU type 1) and printer control characters (LU type 3) do not go through this sequence; they are handled separately.

If an SCS sequence conflicts with a HostPrint setting, the SCS sequence will be followed rather than the HostPrint setting.

Figure 8: HostPrint internal data flow.

HostPrint Workstation Utilities

HostPrint comes with several utilities that are run from a NetWare workstation. To run HPDEF.EXE and HPCONSOL.EXE, you need to have SUPERVISOR, ADMIN or equivalent rights.

HPDEF.EXE. HPDEF is a HostPrint utility required to define the printer name and functions for each printer that will be used by NetWare HostPrint. This utility creates several files depending on the number of printers defined. These files are HPDEF.DAT and *.PDF files.

Note: These PDF files are not compatible with the PDF files in the SYS:PUBLIC directory. They are created in the current directory when you run HPDEF and then must be copied to the SYS:SYSTEM directory. For this reason, we strongly recommend that the HPDEF utility be run from the SYS.SYSTEM directory.

Figure 9: HPDEF screen.

HPDEF includes printer definitions for ten of the most popular printers, which can be copied to create your own definition. The created PDF file is only a pointer and is not compatible with the PDF files in the SYS:PUBLIC directory. All the printer information is stored in the HPDEF.DAT file.

Caution: The HPDEF.DAT , which is the utility's database file, is created and/or modified in your current directory. For ease of use, it is recommended that you run HPDEF from the SYS:SYSTEM directory.

HPCONSOL.EXE. HPCONSOL.EXE is a HostPrint control utility which provides information on print sessions and allows you to display and modify certain CSCON specified settings for future host print jobs. This utility requires HostPrint to be installed and running.

HPOBJECT.EXE. HPOBJECT.EXE is a HostPrint utility that defines a special object for logging in to a file server other than the one running NetWare HostPrint. The advantages of using HPOBJECT.EXE are:

  • Avoids the need for maintaining the password unprotected GUEST username on each remote server

  • The NCP (NetWare Core Protocol) connections to the special object do not count towards the maximum licensed connections on the target server.

For more information on how to use this utility, refer to the NetWare HostPrint 1.1 Administration Guide, Appendix A.

CSCON.EXE. CSCON.EXE is a NetWare for SAA utility used to configure the gateway. Part of the configuration includes the LU definitions.

For HostPrint to work under NetWare for SAA, each printer LU must be defined and configured under CSCON as a dedicated LU, and then allocated to HostPrint. Figure 10 shows the configuration options to choose in CSCON.

Figure 10: CSCON configuration screen for HostPrint with default values displayed.

The following table explains what these fields mean.


Option
Explanation

Print Job Name:

This fielddisplays the available print job definitions created by PRINTCON.

EBCDIC Code Page ID:

This is the number for the EBCDIC Code Page (ECP) table of the data being sent by the host. The defaultfor the U.S. is 037 and it is automaticallyinserted. In the case of the U.S., the actualtable names used are ECP037.XLT for the EBCDICtranslation table, and ACP037.XLT for theASCII translation table. See the NetWareHostPrint 1.1 Administration Guide for theCode Page IDs for other countries.

Print Job Timeout Value:

This fielddefines the time (in seconds) that HostPrint will wait, without receiving data, before it closes the current print job. If this value is set to "0", the current print job will remain open, unless it is closed via the End Bracket option.

Note: Caution must be used when setting this parameter.If the response time is too slow, setting it to a small number may cause the printjob to break pages incorrectly.

Start Printer Session Automatically:

Enter Yes if the host print Session (Printer LU) to start automatically when NetWare HostPrintis loaded. This assumes that at the host, ISTATUS is set to ACTIVE.

Enter No if you wish to manually start the printersession using HPCONSOL.

Return an OpCheck for Invalid Code Error Condition:

Enter Yes if you want HostPrint to reject invalid data (characters that are not valid EBCDIC codes)received from the Host with a "Sense Code 1003" hex.

Enter No if you want the invalid data printed as a hyphen (-).

Return an OpCheck for LU1 Null Code Error Condition:

Enter Yes if you want HostPrint to reject null codes received from the Host on an LU type 1 session with a "Sense Code 1003" hex.

Enter No if you want the value definedin the next field (Hex Value to Send to Printerfor LU1 Null) to be sent to the printer forLU1 Null parameter.

Hex Value toSend to Printer for LU1 Null:

This optionis only displayed if you selected No for the previous option. This field allowsyou to enter a two-digit ASCII hex valueto be sent to the printer when a null codeis received for an LU1 print. Typical valuesare 00 (null), 20 (blank), and 2D (hyphen).

Close PrintJob When End Bracket Received from Host:

Enter Yes if you want NetWare HostPrint to automaticallyclose the current print job whenever andSNA END-BRACKET flag is received.

Enter No if you wish to accumulatethe print jobs until an UNBIND command isreceived to terminate the session, the timeoutexpires, or you manually turn off (stop)the printer session using either HPCONSOLor NetWare for SAAServices Manager (SSM).

Translate LU1Transparent Data from EBCDIC to ASCII:

Enter Yes if you want HostPrint to translate transparentdata received in an LU1 printer session fromEBCDIC to ASCII.

Enter No if you want HostPrint to send the LU1 transparentdata to the printer untouched. This optionis used to send format parameters via escapesequences, or control characters which arenot valid EBCDIC characters or 3270 controlcharacters.

Allow PrintLines Longer Than 132 Characters for LU3:

Enter Yes to allow an LU3 session to print more than132 charactes per line, as defined in thenext field (Characters per line).

Enter No if you wish to set the MPPvalue of 132 even if a larger MPP value isdefined.

CharactersPer Line (MPP):

In this fieldyou can enter a numeric value to representthe Maximum Print Position for LU3 sessions.This value is sent to the print queue atthe start of each print job.

Lines Per Inch(LPI):

In this fieldyou can select the number of Lines Per Inchfor LU3 sessions. Standard LPI values are3, 4, 6, and 8.

Lines Per Page(MPL):

Enter a numericvalue to represent the maximum number oflines for a page. For example, for a lineprinter with an 11-inch form at 6LPI, 66MPL would be the correct value. However,for a page printer (laser), 60 MPL mightbe more appropriate.

HostPrint Configuration Sequence

Here is the entire sequence for creating a HostPrint configuration:

  1. Login as SUPERVISOR, ADMIN or equivalent.

  2. Run PCONSOLE from the workstation.

  3. Create a print queue.

  4. Create a print server.

  5. Assign a print server to a file server.

  6. Configure printers and ports.

  7. Make queue assignments.

  8. Exit PCONSOLE and run PSERVER (.NLM or .EXE).

  9. Map a search drive to the SYS:PUBLIC directory.

  10. Run HPDEF from the SYS:SYSTEM directory and select the desired printer.

  11. Run PRINTDEF to add the device names defined in HPDEF to the PRINTDEF database.

  12. Run PRINTCON to create a Print Job Configuration.

  13. At the server, type LOAD COMMEXEC(if not previously loaded).

  14. Run CSCON to define the HostPrint Lus.

  15. At the server, type CSLOAD PROFILE_NAME to load the profile with the printer LUs defined.

  16. At the server type LOAD HOSTPRT to load the HostPrint NLM.

Note that on a NetWare 4 server, Steps 3 to 7 can be done in one step by selecting the Quick Setup option in PCONSOLE. Also, Steps 2 through 8 (shown in italics) are required only if you have not already performed these steps prior to configuring HostPrint.

Hints:

  1. The PDF files created by HPDEF are not compatible with the ones in the SYS:PUBLIC directory and should not be copied there.

  2. Once you have imported the printers to the PRINTDEF database, you can delete the PDF files from the SYS:SYSTEM directory.

HostPrint Issues

There are several issues relating to NetWare printing which are relevant to HostPrint. These mainly deal with remote printers in one of the following four scenarios.

Scenario 1

You want to run PSERVER on one server for printing on a remote printer attached directly to another server.

  • With NetWare 4, you can do this by running NPRINTER.NLM on the server to which the printer is attached.

  • With NetWare 3.1x, you can't do this - there is no NLM equivalent of RPRINTER. The only solution is to run PSERVER on the server to which the printer is attached.

Scenario 2

Print server, queue, and printer are on different servers. In this scenario, it becomes important to know what circumstances cause a user connection to be used, especially where a Runtime version of NetWare is being used.

Most of the connections are SPX connections, which are limited in NetWare 3.1x. But unlike user connections, SPX connections aren't limited to 1 in Runtime NetWare. The only situation where you need to be concerned about user connections when setting up HostPrint on Runtime NetWare is when a print queue is on a Runtime server. This will take up the single available user connection unless PSERVER is running on the same server.

Scenario 3

A printer is atttached to a workstation via RPRINTER.

This method is not recommended, since it has the potential for disruptions caused by the end-user of the workstation. If for some reason the end-user turns off the printer or the workstation, the other users will not get their print jobs.

Scenario 4

HostPrint is installed in a NetWare 3 server, but the print queue or print server is installed in a NetWare 4 server.

In this scenario, if the NetWare for SAA server is loaded with Runtime NetWare 3.12, you obviously have no printing utilities since the Runtime version of NetWare is shipped without any printing modules.

Figure 11 shows a Runtime 3.12 file server (FS2) with NetWare for SAA and Hostprint 1.1 loaded. Using HPDEF, the PDF file called PRINTER2.PDF was created. On the NetWare 4 file server (FS1) a print job has been created defining the file server, print server, print queue, and PDF file. You must first import (using PRINTDEF) the PRINTER2.PDF file from file server FS2 to file server FS1.

Figure 11: HostPrint 1.1 in a mixed NetWare 3.12 and 4.x environment.

Summary

Figure 12 shows the summary of a print job sent from the Host to the NetWare for SAA gateway. The SAA gateway takes the data and passes it to the the HostPrint LU. HostPrint then determines if the data is SCS LU1 data or non-SCS LU3 data and sends it through the ECP Table to translate the data from EBCDIC to ASCII.

If the data is for an LU Type 1 printer, the data will be converted from EBCDIC to ASCII (through a single code instruction) without being placed in the device buffer. If the data includes printer configuration, it will be compared with the user configuration and if all parameters are defined, it will overide the HostPrint settings. Once the parameters are in the data stream, they are passed on to NetWare for printing.

Figure 12: NetWare HostPrint summary.

SCS control sequences (LU Type 1) and printer control characters (LU Type 3) do not go through this sequence. They are handled separately. If an SCS sequence conflicts with a HostPrint setting, the SCS sequence will be followed rather than the HostPrint setting.

If the data is for an LU Type 3 printer, the data will be converted from EBCDIC to Buffer Code and placed in the device buffer. From the buffer, it will be converted to ASCII through the ACP table. HostPrint will look at the user-defined parameters (defined through CSCON) and add or modify these parameters in the data stream as required. Once the user parameters are in the data stream, they get sent to NetWare for printing.

Appendix A: SCS Codes and Definitions

The following is a list and definitions of the SCS codes. Some of these codes are not supported or are only partially supported by NetWare HostPrint version 1.1 . When this is the case, it will be noted.


Code
Definition

04h

Vertical Channel Select (VCS)

A two-byte control code that allows the selection of one of 12 verticalchannels to control the vertical format. Format for this command is: 04nn

where nn = Vertical Channel Number (7A,7B, 7C, 81, 82, 83, 84, 85, 86, 87, 88, 89)

HostPrint does not support skipping using theVCS code. This code causes HostPrint to performa line feed when the VCS code is receivedby the printer in the data stream.

05h

Horizontal Tab (HT)

A one-byte (05h) format controlcode that moves the print position horizontally,from left to right, to the next tab stopsetting. HT stop values are set by usingthe Set Horizontal Format (SHF) function.If there are no horizontal tabs stops setto the right of the of the current printposition, the HT function results in a space.If an HT function is requested after passingthe Maximum Print Position (MPP), a New Line(NL) function is performed.

08h

Graphics Escape (GE)

A one-byte (08h) control code usedto select APL/Text characters when the APL/Textfeature is installed. HostPrint 1.1 supportsthis code, but does not support printingAPL characters. Unsupported characters areprinted as dashes (-).

0Bh

Vertical Tab (VT)

A one-byte (0Bh) format control codethat moves the print position verticallydown to the next vertical tab stop setting.VT stop values are set by using the Set VerticalFormat (SVF) function. If there are no VTstops below the current print position, theVT function results in Line Feed (LF). Ifa VT function is requested after passingthe bottom margin, the Form Feed (FF) functionis performed.

0Ch

Form Feed (FF)

A one-byte (0Ch) format control code that movesthe print position to the top and left margin(or column 1) of the next form. If the maximumprint line (MPL) value has not been set,the printer uses a default value of 1, andthe print position moves to the left marginof the next line and may be specified anywherein the print job.

0Dh

Carriage Return (CR)

A one-byte (0Dh) format control codethat moves the print position horizontallyto the left margin on the same line. If theprint position is already at the left margin,the function is inoperative.

14h

Enable Presentation (ENP)

A one-byte (14h) format control codethat is accepted by the printer but has noeffect upon the printing. No function is performed.

15h

New Line (NL)

A one-byte (15h) format control code that movesthe print position to the left margin andvertically down to the next line. NL is functionallyequivalent to a CR followed by a LF.

16h

Back Space (BS)

A one-byte (16h) format control codethat moves the print position, horizontally,one position to the left. If the print positionis at column 1, the function is inoperative.Left margin settings are ignored.

1Eh

InterchangeRecord Separator (IRS)

A one-byte (1Eh) grouping control character that terminatesan information block called a record. When an IRS is received, a NL is performed by the printer.

24h

Inhibit Presentation (INP)

A one-byte (24h) format control codethat is accepted by the printer but has noeffect upon the printing. No function isperformed.

25h

Line Feed (LF)

A one-byte (25h) format control code that movesthe print position vertically down one print row.

28h

Set Attribute (SA)

A three-byte (28XXYYh) control codethat is used to set the highlighting, color,and character set attributes. This code isnot supported by Host Print 1.0 or 1.1.

2Fh

Bell (BEL)

A one-byte control code (2F) that causes theaudible alarm to sound. This command hasno effect on HostPrint.

35h

Transparent Function (TRN)

A one-byte (35h) data-definitioncharacter, that provides transmitting datain transparent mode. a one-byte binary valuefollows the TRN code, which specifies thenumber of bytes of transparent data to follow.The length does not include the lengthbyte. Transparent data is user-defined andis not checked for SCS control codes. Theformat for this command is as follows:

35(cnt)(transparent data)

As an example, 35051B266C314Fwould send five bytes of transparent data.In this case the transparent data is setorientation to landscape to an HP III printer.

2BC1h

Set Horizontal Format (SHF)

A two-byte (2BC1) commandsequence that is used to set the horizontalformat parameters, including the MaximumPrint Position (MPP), Left Margin (LM), RightMargin (RM) and Horizontal Tab Stops. A one-bytebinary count follows the SHF code to indicatethe number of bytes to the end of the SHFstring (including the count byte). The firstthree bytes following the count byte definethe maximum print position (MPP), the leftmargin (LM), and the right margin (RM), respectively.The tab stop settings follow the right marginsetting. All values are expressed as one-bytebinary numbers. The format for this commandis as follows:

2BC1(cnt)(MPP)(LM)(RM)T1T2T3....Tn MPP is defined as a line length of less orequal to the platen length. The MPP valueis 132.

LM is defined as thecolumn value of the leftmost print position.The LM also serves as the first horizontaltab stop. Valid LM values are less than orequal to the MPP and less than the RM.

RM is defined as the column value of therightmost print position. Valid RM valuesare less than or equal to MPP.

T1...Tn are horizontal tab stop settings that are set column values for use with the horizontaltab function. The tab stops need not be inorder. Valid tab stop settings are equalto or greater than the LM and less than orequal to the MPP. If no tab stops are set,the default is a space function.

The parameters must be specified in the precedingsequence. If some parameters are zero, orare not included in the SHF sequence, HostPrintuses the default values.

As an example, 2BC104840684 would send the SHF command (four bytes long) with MPP=132 (84h),LM=06, RM=132(84h), and no tab settings.

If the SHF code is not specified, HostPrintuses the MPP value previously set by theMPP set alternate switches, or CSCON, or132 if not set. LM is 1 and RM is equal toMPP.

The minimum SHF sequence containsthe SHF command and count byte of 1 (2BC101),which sets the horizontal parameters to theirdefaults.

An error condition, resultingin a sense code (1005) being sent back tothe Host, occurs in the event of any of thefollowing:

The value of MPP sent exceeds the maximum value allowed by the printer.

The value of LM is greater than the value of MPP.

The value of RM is greater than the value of MPP.

A tab stop has a value lessthan the LM or greater than RM.

2BC2h

Set Vertical Format (SVF)

A two-byte (2BC2) command sequence that is used to set the verticalformat parameters, including the MaximumPrint Line (MPL), Top Margin (TM), BottomMargin (BM), and Vertical Tab Stops. A one-bytebinary count follows the SVF code to indicatethe number of bytes to the end of the SVFstring (including the count byte). The firstthree bytes following the count byte definethe maximum print line (MPL), the Top margin(TM), and the bottom margin (BM), respectively.The tab stop settings follow the bottom marginsetting. All values are expressed as one-bytebinary numbers. The format for this commandis as follows:

2BC2(cnt)(MPL)(TM)(BM)T1T2T3....Tn

MPL defines the page length. Valid MPL valueare from 1 to 127.

TM is defined as the line value to be used in place of line 1 for the top of the page. TheTM also serves as the first vertical tabstop. Valid TM values are less than or equalto the MPL. To ensure correct line feedingof the paper forms, it is recommended thata TM line value of one (01) be set for thefirst print line on the paper forms.

BM is defined as the line value, that, ifexceeded, causes an automatic skip to thetop margin of the next page. The MPLmust be specified when the BM is specified.Valid BM values are less than or equal to MPL.

T1...Tn are vertical tab stopsettings that are set line values for usewith the vertical tab function. The verticaltab stops must be listed in increasing order.Valid tab stop settings are equal to or greaterthan the TM and less than or equal to theBM. The MPL must be specified as a valuegreater than 1.The parameters must be specifiedin the preceding sequence. If some parametersare zero, or are not included in the SVFsequence, HostPrint uses the default values.

As an example, 2BC204420142 would send the SVF command (four bytes long) with MPL=66(42h), TM=01, BM=66 (42h), and no tab settings.

The minimum SVF sequence contains the SVF commandand count byte of 1 (2BC201) which sets thevertical parameters to their defaults.

An error condition, resulting in a sense code(1005) being sent back to the Host, occursin the event of any of the following:

The value of MPL sent exceeds the maximum value allowed by the printer.

The value of TM is greater than the value of MPL.

The value of BM is greater than the value of MPL.

A tab stop has a value less than the TM or greater than BM.

2BC6h

Set Line Density (SLD)

A two-byte (2BC6) command sequencespecifying the distance to be moved for single-linevertical spacing, as in NL or LF. The SLDcode precedes the setting of parameters.The first parameter byte is a count field.If the count field is 02h, the secondparameter byte specifies the line density.If the count field is 01h, the linedensity is set to the operator-defined value.The format for this command is:

2BC6 (cnt) (LD)

Valid values for the SLD parameter are:

00.00   =   6 LPI    (Default) 09.00    =   8LPI     0C    =   6 LPI 12.00   =   4 LPI 18.00   =   3 LPI

As an example, 2BC60209 sets the line density to 8 LPI.

The SLD code value must be set prior to setting the SVF value,in order to calculate the correct page length.If the SLD code is not specified, HostPrintuses the previously set parameter.

An error condition, resulting in a sense code(1005) being sent back to the Host, occursin the event of any of the following:

SLD value other than hex "00", "09", "0C", "12"or "18" are received.

First parameter values other than "01" or "02" are received.

Appendix B: EBCDIC Tables

Following is the English U.S - EBCDIC Table (Code Page 37) for LU Type 3.


Sec-ondHexCharacter
FirstHex Character

0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

8.00

9.00

A

B

C

D

E

F

0.00

SP

&

-

{

}

\

0.00

1.00

/

a

j

_

A

J

1.00

2.00

b

k

s

B

K

S

2.00

3 .00

c

l

t

C

L

T

3.00

4.00

d

m

u

D

M

U

4.00

5.00

NL

e

n

v

E

N

V

5.00

6.00

f

o

w

F

O

W

6.00

7.00

g

p

x

G

P

X

7.00

8.00

h

q

y

H

Q

Y

8.00

9.00

EM

'

i

r

z

I

R

Z

9.00

A

4

!

_

:

B

^

$

,

#

C

FF

DUP

<

*

%

@

D

CR

(

)

_

'

E

FM

+

;

>

=

F

|

5

?

"


Legend
Description

FF

=

Form Feed

CR

=

Carriage Return

NL

=

New Line

EM

=

End of Message

DUP

=

Duplicate

FM

=

Field Mark

SP

=

Space

Following is the English U.S - EBCDIC Table (Code Page 37) for LU Type 1 (SCS).


Second Hex Character
FirstHex Character

0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

8.00

9.00

A

B

C

D

E

F

0.00

SP

&

-

{

}

\

0.00

1.00

/

a

j

_

A

J

1.00

2.00

TRN

b

k

s

B

K

S

2.00

3.00

c

l

t

C

L

T

3.00

4.00

VCS

ENP

d

m

u

D

M

U

4.00

5.00

NL

LF

e

n

v

E

N

V

5.00

6.00

BS

f

o

w

F

O

W

6.00

7.00

g

p

x

G

P

X

7.00

8.00

GE

SA

h

q

y

H

Q

Y

8.00

9.00

EM

'

i

r

z

I

R

Z

9.00

A

4

!

_

:

B

VT

^

$

,

#

C

FF

DUP

<

*

%

@

D

CR

(

)

_

'

E

IRS

+

;

>

=

F

BEL

|

5

?

"


Legend
Description

VCS

=

Vertical Channel Select

GE

=

Graphics Escape

VT

=

Vertical Tab

FF

=

Form Feed

CR

=

Carriage Return

ENP

=

Enable Presentation

NL

=

New Line

BS

=

Back Space

EM

=

End of Message

DUP

=

Duplicate

IRS

=

Interchange Record Separator

INP

=

Inhibit Presentation

LF

=

Line Feed

SA

=

Set Attribute

BEL

=

Bell

TRN

=

Transparency

SP

=

Space

Appendix C: Additional References

The following reference manuals were used to compile the information presented in this AppNote:


NetWare 3.11 Advanced System Manager

100-000987-001

NetWare 3.12 Concepts

100-001715-001

NetWare 3.12 Print Server

100-001722-001

NetWare 3.12 Utilities reference

100-001714-001

NetWare 4.0 Concepts

100-001417-001

NetWare 4.0 Print Services

100-001419-001

NetWare 4.0 Utilities Reference

100-001416-001

NetWare for SAA Info Guide

482-000072-004

NetWare HostPrint Admin Guide

100-001390-002

NetWare HostPrint Features and Functions

Host Printer NLM Functional Specifications

ES00052-01

LU T1 and T3 Structure Chart

TN00004-01

3270 Workstation Printer Emulation

Design Specificationand Test Environment ofthe SKU3 LU1 and LU3 Printer Drivers

IBM 3287 Printer Component Description

GA27-3153-5

IBM Data Stream Programmer's Reference

GA23-0059-07

IBM 3274 Control Unit Reference Summary

GX20-1878-7

IBM 3174 Functional Description

GA23-0215-3

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates