www.ibm.comLANDP Webpage

LANDP Financial Printer Server

Introduction

This session provides practical experience with LANDP's financial printer support. During the session, you will customize a simple LANDP workgroup consisting of a single workstation attached to a financial printer. You will be shown how to perform some basic printing operations, and you may also choose to learn about LANDP's more advanced printing abilities.

Summary of Steps

Things to do Before you Begin

In this example we will be using a 47x2 series printer on a Windows NT platform. Please ensure you have an IBM 47x2 series financial printer attached to your computer's first serial port (COM1).

In order for the LANDP printer server to communicate with the printer, you need to install the appropriate printer driver software.

To install the 47x2 series printer driver, do the following:

Platform Windows NT/2000/XP OS/2 DOS
Driver files to copy FIOPRT.DCP
P4722-3.PCH
P4722-OP.PCH
P4722.PCH
WNT47X2.DLL
WNTSFPRT.DLL
4772PDD.SYS
FIO.MSG
FIOH.MSG
FIOPRT.DCP
P4722-3.PCH
P4722-OP.PCH
P4722.PCH
PRTCALLS.DLL
FPRT221.SYS
Destination C:\EHC\EHCN600\ C:\EHC\EHCO600\ C:\EHC\EHCD600\

If you have a DOS or OS/2 workstation, you must also modify the CONFIG.SYS file with an entry for the printer device driver. See Preparing LANDP platforms, on page 85 of the LANDP Installation and Customization manual for more information.

Customizing LANDP for Printers

In this section the LANDP configuration files are written to specify a LANDP workstation that provides printing services. The steps required during customization are outlined below.

Creating Common Definitions

Read more about creating LANDP common definitions.

The table 'Vectors - a quick reference', on page 44 of the LANDP Installation and Customization manual, shows that LANDP expects to find a FORM47X2 common definition for the 47x2 printer server (PR47X2##).

For the purposes of this tutorial we will specify 2 paper formats for the printer server, One 20x15 character single-sheet format, and one passbook. We will also define a magnetic stripe format to allow us to read and write the magnetic stripe on the back of the passbook.

FORM47X2  TYPE=DOCU,
NAME=DOC1,
LINELEN=20,
PAGESIZE=15
FORM47X2  TYPE=PASS,
NAME=PASSBOOK,
CPI=12,
FOLDBEG=10,
FOLDSKIP=4,
HRZOFFS=11,
LINELEN=50,
LPI=6,
PAGESIZE=23,
VRTOFFSL=7
FORM47X2  TYPE=REMS,
NAME=MAGSTRIP,
BKWIDTH=142,
REMSMODE=I
SOFTPACK PACKNAME=CONFTEST,
FILENAME=EHCXLATE.DLL,
FILEPATH=C:\EHC\EHCN600\ 
SOFTPACK PACKNAME=CONFTEST,
FILENAME=SVPCPRBN.EXE,
FILEPATH=C:\EHC\EHCN600\ 
SOFTPACK PACKNAME=CONFTEST,
FILENAME=SVPCPRBN.HLP,
FILEPATH=C:\EHC\EHCN600\ 

Creating Workgroup Definitions

A brief overview about creating LANDP workgroup definitions is available.

We will specify a single workstation providing printing services in a workgroup called "PR47". We will also specify that the workstation will be used as a client for the printer.

LANCONF  NAME=PR47,
WSNAMES=(F1)
LWSCONF NAME=F1,
TYPE=NT,
SERVER=(PR47X2##),
PAR&47X2=(C,C,9600,4722),
CLIENT=(PR47X2F1,F1),
SES&47X2=(F1,F1,1,C),
SOFTPACK=CONFTEST

Validating Common and Workgroup files

The COMMON.SPC and LANCONF.SPC must now be validated to ensure they have been entered correcly. For more information about the validation stage see page 55 of the LANDP Installation and Customization manual.

C:\
CD C:\EHC\EHCCUS\
VALSPEC COMMON

VALSPEC LAN \PR47

Distributing Runtime Files

Once the configuration has been validated, the LANDP files to be installed on each workstation can now be generated and copied. This is the distribution stage.

GENRUN \PR47

GETTING \PR47 WS=F1 C:\PR47\

The LANDP files are now installed in the directory C:\PR47\.

Starting LANDP

The final stage is to start the LANDP services on the workstations.

CD \PR47
AUTOFBSS

The LANDP services should now have started. To view a list of the running LANDP services, type EHCINFO at the command prompt. You are now ready to begin using the LANDP printer support.

Testing your Configuration and Printing

Testing of LANDP servers is done using the SVPCPRB program. For more information on the SVPCPRB program and it's capabilities, see page 107 of the LANDP Programming Guide.

Starting SVPCPRB

Communication with LANDP services is done by sending CPRB messages. The first message we must send is an IN command to the LANDP Supervisor server.

If the CPRB message was recieved successfully, the Server Return Code shown in the Output panel should read "OK". If the return code is different, refer to the Problem Determination manual for more information.

Printing Using the DOCU format.

The DOCU printer format is used for single sheets of paper like invoices and statements. It is the simplest printer format. This tutorial will take you through the process of laying out text on the DOCU form.

First we must open the printer for use by our client. This is done by sending an OP message to the LANDP printer server:

The next stage is to set the printer format to use. Printer formats define features such as page size and margins, as well as text size and style. Printer formats are set using the DF function of the LANDP printer server. You can define a printer format in a number of ways:

Entering a format definition directly.
The format options are written as a series of HEX numbers, according to the table on page 150-155 of the LANDP Programming Reference, and included in the Request Data Area of the CPRB message.
Specifying a format definition defined at Customization.
In this example, we defined a DOCU type printer format called "DOC1" in the COMMON.SPC.

The DOC1 format is configured to automatically wrap text if a line exceeds the width of the form. You can optionally configure the printer server to issue an error return code when the line length is exceeded using the AUTONL parameter of the FORM47X2 vector.

You can also configure a line that, when reached, will cause the printer server to issue a warning return code. This may be useful when ensuring the printer does not spoil a financial document.

See page 328 of the LANDP Installation and Customization manual for more details on the parameters that you can use when defining printer formats.

To select the DOC1 printer format, send a DF message to the printer server as follows:

The printer server is now configured with to print pages 20 columns wide and 15 columns high.

Once the printer format has been specified, you can begin printing. Insert some paper into the printer and issue a WR message as follows:

The printer should print a box of asterisk characters. Laying out text on the paper involves using the following 3 characters:

To finish the printing operation and eject the paper, issue a CL command as follows:

Setting and Reading Code Pages and Fonts

The code page of the printer defines what characters are available during printing. The code page and font used by the printer can be determined using the RC function of the printer server as follows. Remember to open the printer before issuing these functions.

The result in the Reply Data Area will be a 4-digit number. The first 3 digits indicate which code page is being used, and the last gives the current font. See page 162 of the LANDP Programming Reference for information on how to interpret this code.

The code page and font of the printer can be set using the SC function of the LANDP printer server as follows:

This will set the code page of the printer to 437 and the font to Near Letter-Quality. You can check that the code page has been set by using the RC function shown above.

When you have finished with LANDP and the printer server, issue a CL command to the printer server to close the device, and issue an EJ command to disconnect from LANDP as follows:

Introduction New to LANDP? Make the most of LANDP Solving LANDP problems Feedback