Skip to content

How to Establish Printers

If you have just finished installing Thoroughbred Basic, you can use the information in the following sections to specify how Thoroughbred Basic interacts with your site printers:

  • To make a printer available to Thoroughbred Basic you can use the procedure and information in the section titled How to Make Printers Available. Thoroughbred Basic can work with two types of printers:
    1. Direct or spooled printers, which are available to all users.
    2. Slave printers, which are attached to one terminal and available only to that terminal.
  • To make a printer unavailable to Thoroughbred Basic you can use the procedure and information in the section titled How to Make a Printer Unavailable.
  • To exit from the install utility, you can use the procedure in the section titled How to Leave the Install Utility.
  • To ensure that Thoroughbred Basic can make full and efficient use of slave printers, you can use the information in the section titled Considerations for Slave Printers.
  • Printer mnemonics are variables that contain codes or characters that can be interpreted by a printer driver. For more information on how printer mnemonics can be used in Thoroughbred Basic programs, please refer to the information in the section titled How to Use Printer Mnemonics.

If you plan to establish a site printer as part of the terminal definition procedures described in How to Establish Terminals, you can use the information in the sections titled How to Make Printers Available and How to Leave the Install Utility to define a site printer to Thoroughbred Basic.

From the operating system prompt in your Thoroughbred Basic home directory type

./install

and press the Enter key. The install utility will display the Installation and Updating Procedures Menu:

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To define a printer type 4 and press the Enter key. The install utility will display the Install/Update BASIC Printers screen:

4) Install/Update BASIC Printers
Currently Defined Printers
BASIC line slave unix
device width spool printer lock device
LP - 132 no no yes lp
P7 - 132 no no yes null
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To define a printer and add it to the list of available printers, type a and press the Enter key. The following message will be displayed:

Enter BASIC device name (LA-Z, L1-9, PA-PZ, P1-P9) or <CR> to end:

Type a valid printer device name and press the Enter key. The following message will be displayed:

Is this device a slave printer? Enter y or n (<CR>=n):

Y means the device is a slave printer. For more information on slave printers, please refer to
Consideration for Slave Printers

N means the device is a direct or spooled printer.

After you enter a valid value, the following message will be displayed:

Is this device spooled? Enter y or n (<CR>=n):

Y means the device is a spooled printer. If you type Y and press the Enter key, the following message will be displayed:

Enter spooling program name:

Type the name of the printer’s spooling program and press the Enter key.

N means the device is a direct printer. If you type N and press the Enter key, the following message will be displayed:

Enter unix device name:

Type the name of the UNIX device associated with the printer and press the Enter key.

After you enter the name of a spooling program or a UNIX device, the following message will be displayed:

Enter printer line width 32-255 or <CR> (<CR>=132):

Type a valid value for line width and press the Enter key. The following message will be displayed:

Is this an exclusive use device? Enter y or n (<CR>=y):

Y means the printer is available to only one Thoroughbred Basic task at any one time.

N means the printer is available to more than one Thoroughbred Basic task at any one time.

After you enter a valid value, the install utility will redisplay the Install/Update BASIC Printers screen, which contains the current list of printers available to Thoroughbred Basic.

You can make more printers available to Thoroughbred Basic. If you are establishing a site printer as part of the terminal definition procedures described in How to Establish Terminals, please refer to the section titled How to Leave the Install Utility.

To make a printer unavailable to Thoroughbred Basic, use the install utility to display the Install/Update BASIC Printers screen:

4) Install/Update BASIC Printers
Currently Defined Printers
BASIC line slave unix
device width spool printer lock device
LP - 132 no no yes lp
P7 - 132 no no yes null
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

To delete a printer from the list of available printers, type d and press the Enter key. The following message will be displayed:

Enter basic device name (LA-Z, L1-9, PA-PZ, P1-P9) or <CR> to end:

Type a valid printer device name and press the Enter key. The printer will be unavailable to Thoroughbred Basic. The install utility will redisplay the Install/Update BASIC Printers screen, which contains the current list of printers available to Thoroughbred Basic.

To stop making printers available or unavailable to Thoroughbred Basic, make sure the install utility is displaying the Install/Update BASIC Printers screen:

4) Install/Update BASIC Printers
Currently Defined Printers
BASIC line slave UNIX
device width spool printer lock device
LP - 132 no no yes lp
P7 - 132 no no yes null
Add or Delete? Enter a, d or <CR> to end:

You must enter a valid value in the following field:

Add or Delete? Enter a, d, or <CR> to end:

Press the Enter key. The install utility will display the Installation and Updating Procedures screen.

Thoroughbred BASIC Installation and Updating Procedures
1) Install New System
2) Install/Update User Logins
3) Install/Update BASIC Directories
4) Install/Update BASIC Printers
5) Install/Update BASIC Terminals
6) Install/Update BASIC Ghost Tasks
Enter Selection (1 - 6) or <CR> to end:

You must enter a valid value in the following field:

Enter Selection (1 - 6) or <CR> to end:

To leave the install utility and return to the operating system prompt, press the Enter key.

A slave printer is a printer connected to a terminal’s auxiliary or printer port and available only to that terminal. For information on communications between the terminal and the slave printer, please refer to your terminal or printer reference manuals.

Thoroughbred Basic slave printer support is available for the Televideo 950, Wyse 50 and Wyse 60 terminals. Support may be available for terminals that emulate these terminals as well as for some terminals that provide similar implementations of the Transparent Print Mode. For more information, please contact your Thoroughbred dealer.

To specify a slave printer, find the Thoroughbred Basic IPL file. In most cases, the file is named IPLINPUT, which is the default. You can open the file with vi or some other text editor. For more input on the IPLINPUT File, please refer to the Thoroughbred Basic Customization and Tuning Guide – System Files.

In the IPL file, find the DEV statement that contains the specification for the slave printer. A sample listing follows:

DEV P1,4,,80,2,,tty

DEV
begins the device statement.
P1
is an internal device name. In this example, the internal device name is P1.
4
means the device type is a printer.
80
is the printer's line width.
2
means that the printer is a slave printer.
tty
is the device name specified in the /dev directory. Other terminals can be referenced explicitly by their UNIX device names, e.g., tty1, tty2, and so on.

The device name, tty in this example, must be the same as the device name of the first DEV line that specifies a terminal. If the device names are different, Thoroughbred Basic will ignore the slave printer.

Use the information in the section titled Consider Terminal Mnemonics to check the relevant terminal table. The table must define the PS (print start) and PE (print end) mnemonics:

  • For a Televideo 1950, PS must be $1B60 and PE must be $1B6.
  • For a Wyse 50, PS must be $18 and PE must be $14.
  • For a Wyse 60, PS must be $1B6423 and PE must be $14.

If PS and PE are not defined, the output to the slave printer will go to the control terminal. For more information on these mnemonics, please refer to the section titled Consider Terminal Mnemonics and Introduction to Terminal Mnemonics.

There are some rules and guidelines that may help you efficiently use slave printers:

  • Because the system uses the XON/XOFF protocol to control data flow, you should not use the Ctrl-S or Ctrl-Q keystroke sequences on a terminal with an active slave printer.

  • In most cases, pressing the Escape key has no effect until output to a terminal or slave printer stops. If output is suspended because of an XOFF from the printer or terminal, or because of a Ctrl-S keystroke sequence, pressing the Escape key will have no effect until XON or a Ctrl-Q keystroke sequence is received; either action enables the system to finish sending buffered output. You may have to press the Escape key several times to exit slave printing.

  • If the slave printer becomes unready, e.g., it ran out of paper or was taken off-line, its terminal will send an XOFF to the host system and then suspend operation. You cannot restore it to ready condition unless you specify a time out in Thoroughbred Basic.

    In some cases, you may need more than a Thoroughbred Basic time out. Interaction with the operating system time out control may prevent you from easily restoring the ready condition.

Printer mnemonics are variables that can be interpreted by a printer driver. Use of printer mnemonics can speed application development by ensuring that programmers will not have to remember or look up code sequences, by providing naming conventions for actions that can occur on a number of site printers, and by helping programmers produce more readable code.

These mnemonics are specified and defined in printer mnemonic tables. You can create and load printer mnemonic tables other than the default printer table already installed with your system.

The default mnemonic table consists of the following mnemonic codes and escape sequences:
Line feed LF $0D0A$
Carriage return CR $0D$
Form feed FF $0C$
Escape ES $1B$
Ring bell RB $07$
Expanded print EP N/A

A mnemonic code must contain between 2-31 characters.

The line feed mnemonic’s escape sequence must be set up as a carriage return and line feed (CRLF).

The 2-character mnemonic codes for line feed, carriage return, form feed, and escape must be in every mnemonic table. If any of these codes are not in a table maintained by Dictionary-IV, then each nonexistent mnemonic code and its default escape sequence will be inserted during mnemonic table record generation. The counting of these lines will be incorrect and scrolling will not be done properly.

All printer mnemonic tables, except for the default, are maintained in Dictionary-IV. A mnemonic table record is generated after a table is edited and a printer assignment is specified. It is stored in the IDDBD file. For further information on printer mnemonic tables, please refer to the Thoroughbred Dictionary-IV Reference Manual.

During the startup of Thoroughbred Basic, printer assignments in Dictionary-IV are compared to printers configured in the IPLINPUT file. If a valid printer assignment record and mnemonic table record exists in Dictionary-IV for a printer in the IPLINPUT file, then that mnemonic table is loaded; otherwise, the default mnemonic table is loaded. Once a mnemonic table has been loaded, it remains in memory for that printer until another table is loaded.

A mnemonic table may also be loaded after Thoroughbred Basic has been started. There are four different ways of loading it after the initial installation. These four ways are illustrated in the following examples:

OPEN (1,OPT=“INITTAB”)“PO”

reloads the initial mnemonic table by specifying the “INITTAB” option during the OPEN statement for the printer.

Note:
Any changes made to printer assignments or mnemonic tables in Thoroughbred Dictionary-IV since Thoroughbred Basic was started are reflected.

OPEN (1,OPT=“TABLE=HPLJ+”)“PO”

loads another table from the IDDDB file by specifying the “TABLE=” option during the OPEN statement for the printer.

Note:
The OPENing of the printer fails with an ERR=20 if the specified table name is longer than 6 characters or fails with an ERR=11 if the specified mnemonic table does not exist.

OPEN (1) “PO”
PRINT (1) ‘LT’, HTA(TABLE$), ‘LE’

works when hand-loading a mnemonic table after a channel to the printer has been OPENed. The table is loaded by the PRINT directive using the HTA function, and the load table (‘LT’) and load end (‘LE’) mnemonics.

Note:
When a mnemonic table is loaded in this fashion, the name portion of the string returned by the DSD function is padded with spaces.

OPEN (1) “PO”
PRINT (1) ‘LT’, ‘LE’

works when hand-loading the initial mnemonic table after a channel to the printer has been OPENed. The table is loaded by the PRINT directive using the load table and load end mnemonics.

From the Customization and Tuning Guide: Devices, version 8.9.1. Open this page in the PDF