The PFTSETUP program is intended for use by programmers, technicians, or printer function experts.”
This ominous statement in an IBM technical manual made me curious. What was the PFTSETUP program, where could I find it, and why wasn’t I supposed to use it? What exactly is a “printer function expert,” anyway? To find the answer to these questions, we first have to look at Client Access/400 and how it handles workstation function (WSF) printer sessions.
We know that all printers provide basically the same functions. They can all print bold characters, underlined words, and upper- and lower-case letters. A personal computer controls these functions by sending the printer a series of control characters. A control character is a hexadecimal value that instructs the printer to turn a particular function on or off. If you wanted to print a word in bold, for instance, the computer would first send a hexadecimal value which would tell the printer to turn bold printing on. After sending the word to be printed, the computer would then send another hexadecimal value to tell the printer to turn bold off. The problem is that not all printers speak the same language. The value that instructs an IBM printer to start bold printing, for example, might be different than the value used to start bold printing on an Okidata printer. Client Access/400 overcomes this problem through the use of a predefined printer function table (PFT).
A PFT is a table, exclusive to a particular make and model of printer, that contains all the control codes needed to control that printer. More than sixty predefined PFTs are provided with Client Access/400, including tables for many popular makes and models of printers. What if you have a printer that isn’t among those 60-plus printers? That’s where the mysterious PFTSETUP program comes in. PFTSETUP is a program that allows you to create a new PFT or modify an existing PFT to handle your printer.
Running PFTSETUP
The PFTSETUP program is located in the MRI2924 subdirectory of your Client Access/400 program directory. The program is run from the DOS prompt and requires 330KB of free memory. The printer you are defining should be connected to your PC and powered on. If your printer is a serial printer, you must first redirect the printer output to the serial port with the DOS MODE command. The following is an example of this command, although your printer documentation may provide you with a different baud rate or other parameters.
MODE COM1:1200,n,8,1,p
MODE LPT1:=COM1
The first MODE command sets the communication parameters for the serial port. The second MODE command redirects printer output to the serial port. To start the PFTSETUP program, change your current directory to the MRI2924 subdirectory and type PFTSETUP. You will be presented with an introductory screen with the IBM logo. Press Enter to continue. The program will then ask if you want to create a new PFT or edit one of the existing PFTs. (For a complete listing of PFTs supplied with Client Access/400, see Appendix A.1.1 of the Client Access/400 for DOS and OS/2 Technical Reference.) If you are modifying an existing PFT, it is always a good idea to make a backup copy of the original before you begin.
Whether you choose to create or modify a PFT, you will be shown a screen that briefly describes the program and provides a disclaimer that not all functions may work on your printer. It also explains that you must contact your printer manufacturer to receive the correct control codes for your printer. Many printer manufacturers supply the control codes in the documentation that comes with the printer. If you did not receive the control codes with your printer, you may have to call or write the manufacturer, or try accessing their Web site on the Internet to obtain the proper codes. The program then informs you that not all of your printer functions are supported by WSF. Although most major functions are supported by WSF, the following functions are not: multiple copies, slot selection definition, control sequence file name, continuous feed select, ignore/enable paper end sensor, collate, set left margin, and user-defined controls, except number 984-
999. (We will discuss user-defined controls a little later.) You will be prompted to enter the name of the new or existing PFT and also the LPT port of the printer and whether it is continuous or cut-sheet feed. (This information is used for testing purposes.)
Next, you will be presented with the menu pictured in Figure 1, from which you can make selections and enter the corresponding control codes for your printer. If your printer documentation indicates that a particular function calls for control code Esc E, for instance, you would enter 1B 45 in the space provided (1B is the ASCII hexadecimal value for Esc and 45 is the ASCII hex value for E). Note that pairs of hexadecimal characters are separated by a space and can be entered in upper- or lower-case letters.
Menu selection number 6 is for user-defined controls. Although we will not cover these controls in detail, WSF supports the following user-defined controls:
• 984-985—used to specify envelope size
• 986-987—used to specify page size
• 988—used to define printer data stream used in the PFT
• 989-991—used with HP LaserJet IID printers to define simplex and duplex printing
• 992—used to move the output tray for easier paper separation
• 993-996—used to define portrait and landscape page rotation
• 997-999—used to control computer output reduction if output will not fit on one page in portrait mode
Testing Your Work
Before testing your work, it is best to save your PTF first by pressing Esc and selecting the Save and Continue option. Begin the printer tests by selecting option 7 on the menu. You will be shown the Function Selection Tests menu as shown in Figure 2. You may select to run the tests individually or select option 1 to run all of the printer tests. (You do not need to run option 8, Cursor Draw (Box) Characters, as this function is not supported by WSF.)
The test will print a series of samples and ask you which sample is correct. If none of the samples prints correctly, you can return to the Create/Edit Printer Function Table menu to redefine the control character sequence for that function. Continue to run the tests and make corrections until the test samples print correctly. Remember to save your corrected PFT before exiting the program.
To use your newly created printer function table, you need to create or modify a WSF printer session, specifying the new PFT. (For detailed instructions on creating a WSF printer session, see the Client Access/400 Setup Guide for the type of Client Access you are using.)
Where to Go From Here
If you are interested in learning more about Printer Function Tables, refer to Appendix A of the Client Access/400 for DOS and OS/2 Technical Reference Guide. If you made it this far, you are well on your way to becoming a “printer function expert,” fully qualified to use the PFTSETUP program to customize your own PFTs.
Figure 1: The Create Printer Function Table Menu
Figure 2: The Function Selection Tests Menu
LATEST COMMENTS
MC Press Online