PRINT370 manual

9. Printing from DOS

You can use device drivers to print to S/390 channel attached printers from DOS when the BARR/RJE, BARR/AFP, or BARR/SPOOL software is not loaded. The device drivers come with the PRINT370 reference files. When you install the device drivers, they add new output devices to DOS. You can copy files to the output devices or you can modify application programs to write directly to the device drivers.

Note that the DOS device drivers do not support AFP printing. Because the mainframe controls AFP printing, you must load BARR/RJE or BARR/AFP software if you want to print to AFP printers.

To install the device drivers, you must add commands to the DOS configuration file CONFIG.SYS, as described in this chapter. For more information about the DOS CONFIG.SYS file, see your DOS manual. For more information about how to modify your application programs to write directly to the device drivers, see Appendix D.


9.1 Install the Device Drivers

You need to install two device driver files that come with PRINT370. The files you use depend on which adapter you have. The first device driver, P37MBASE.EXE (for the CHANNEL-OUT (BT) adapter) or P370BASE.EXE (for the PRINT370 adapter), is a base driver that controls all adapter and channel operations. You need to load only one base driver. The second driver, PRINT370.EXE, is the printer driver that controls all output to the printer. You need to load one printer driver for each printer you use. When you install the printer driver, a new name is added to the list of DOS devices. The PRINT370 device name is treated like other devices such as LPT1 and COM1.

Base Device Driver

The P37MBASE.EXE (for the CHANNEL-OUT (BT) adapter) or P370BASE.EXE (for the PRINT370 adapter) base device driver controls the adapter and channel. The printer device drivers use the base device driver to communicate with the printer. For example, after the printer drivers format the data the base device driver sends data to the printer.

Help

To display help and the version number for the base device driver, type the corresponding command at the DOS prompt. For the PRINT370 adapter, type this command:

p370base /h

For the CHANNEL-OUT (BT) adapter, type this command:

p37mbase /h

Install Command

To install the base device driver, you must enter a command in your CONFIG.SYS file. For the CHANNEL-OUT (BT) adapter, enter this command:

DEVICE=C:\BARR\P37MBASE.EXE

For the PRINT370 adapter, enter this command:

DEVICE=C:\BARR\P370BASE.EXE

Command Options for the PRINT370 Adapter – If you have the PRINT370 adapter, you can specify address and interrupt request options for the base device driver. Separate the options with a character space. Change the default settings only if you verify a conflict with other equipment in the PC. If a conflict exists, the software will not function correctly when you attempt to start or operate it.

These options do not apply to the CHANNEL-OUT (BT) adapter.

A=aaa

Address of the PRINT370 adapter. This value must match the address jumper setting on the adapter. The default value is 298. Other choices are 288, 2A8, or 2B8.

PC AT Computers: IRQ7 is the only IRQ available for the eight-bit slot of a PC AT.

I=ii

Interrupt Request (IRQ) used by the PRINT370 adapter. The default value is 15. Other choices are 10, 11, 12, or 7.

Printer Device Driver

Load one copy of the printer device driver PRINT370.EXE for each channel printer you use from DOS. The printer driver formats the data for printing.

Help

To display help and the version number for the printer device driver, type the following command at your DOS prompt:

print370 /h

Install Command

To install the printer device driver, type the following command in your CONFIG.SYS file:

DEVICE=C:\BARR\PRINT370.EXE A=nn N=name

You must specify a printer address and device name. You also can specify other options. Separate the options with a character space.

A=nn

Address of your printer. This option is required. The driver does not assume a default value.

C

Specify the letter C to disable the printer option Conditional new page at end of file. Omit the letter C to enable the option.

D=n

Display level for status and error messages.

0 – Do not display messages.

1 – Display only errors.

2 – Default. Display all status messages.

N=name

The DOS name that identifies the printer device. This option is required. The name can contain up to eight characters and must consist of only letters and numbers (for example, PRINTER1).

O

Specify the letter O to enable the Printer performance Optimized option. Omit the letter O to disable the option.

P=n

Printer type.

0 – Default. IBM 3211 or equivalent printer.

1 – IBM 3203 or equivalent printer.

2 – IBM 6262 or equivalent printer.

4 – Xerox laser printer.

5 – Kodak Komstar computer output microfiche device.

S=x,y

Location where error messages and printer status messages display. Specify the display location with x and y coordinates, where x indicates the column position (0 to 60) and y indicates the line position (0 to 24). For example, set s=0,0 to indicate the top left corner of the screen. The default setting is s=60,1, which displays messages on the first line of the screen starting at column 60.

The status information is 20 characters long. Do not specify a starting column greater than 60 on an 80-column display, and do not specify a starting column greater than 112 on a 132-column display.

Multiple printers: Assign each printer different display coordinates. Otherwise messages for different printers will overlap and the status of some printers will not be visible.

T=tt

The timeout value. After tt seconds of idle time, the driver assumes that the file received from DOS is complete and flushes the data to the printer. The default is 3 seconds.

X

Specify the letter X to disable data translation. If you specify this option, the device driver does not translate ASCII PC files to EBCDIC before it sends them to the printer. The X option is useful when you print ASCII PC files that contain Xerox Metacode to Xerox laser printers. Omit the letter X to enable data translation.

Example Driver Configuration

The following example shows CONFIG.SYS file commands to define two S/390 channel printers to DOS for the CHANNEL-OUT (BT) adapter.

If you have the PRINT370 adapter, replace P37MBASE with P370BASE in the first command.

In this example, the adapter is set at the default settings. The first printer, PRINTER1, is a 3211 printer (default) at channel address 0E. The second printer, PRINTER2, is a Xerox printer at channel address 0F, and ASCII to EBCDIC data translation is disabled (X). For both printers, status messages will display only when errors occur. Messages for the first printer will display on line 1 beginning in column 60, and messages for the second printer will display on line 2 beginning in column 60.

9.2 Print Files from DOS

You can print files with the ASCII or S/370 formats by copying the files to the channel-attached printer driver with the DOS copy command.

The format of the copy command is as follows:

copy /b filename printer

Substitute the name of your file and your printer.

The /b option tells DOS to determine when it reaches the end of the file by reading the number of bytes specified by the file size. With this method, DOS sends all characters to the printer as data. The default option (if /b is omitted) tells DOS to look for the ASCII Ctrl-Z (1A) end of file character. As a result, characters that have a special meaning for DOS are not sent to the printer.

For example, if you specify

copy /b weekly.rpt printer1

DOS copies the entire file to PRINTER1 as data.

Do not attempt to print from DOS when BARR/RJE, BARR/AFP, or BARR/SPOOL software controls the channel. When you load a base Barr product with PRINT370 support, the software automatically disables the device drivers. Because DOS does not know that the device drivers are disabled, DOS might get stuck while it waits for the device drivers to enable. As a result you might not be able to exit the base Barr product and might have to restart your PC. Also, if you use the device drivers to send a file to the printer, be sure the data finishes printing before you attempt to load the base software. It is best not to load the device drivers if you plan to print from BARR/RJE, BARR/AFP, or BARR/SPOOL.

9.3 Use Translation Tables for Device Drivers

A default translation table is built into the DOS device drivers, but you can modify this table. When you use the BARR/RJE, BARR/AFP, or BARR/SPOOL software, you can directly edit an ASCII-to-EBCDIC translation table to control data translation from the software Installation Description. When you use the DOS device drivers, you must use separate utility files to change the translation table.

Standard Translations

You can control the translation of control codes with the P370XLAT.EXE file as follows:

For more information about the default translations, see the Tuning and Global Options, ASCII and EBCDIC Translation Tables section in your BARR/RJE manual or your BARR/SPOOL manual.

Custom Translations

You can modify P370XLAT.EXE to perform custom translations. Custom translations require three files: a program file, a source file, and a make file. If you are not familiar with editing, assembling, and linking programs, you might need help from a programmer. You must have a Microsoft equivalent assembler (MASM) and a linker (LINK) to create an executable file (.EXE).

Follow these steps to create a custom translation table.

  1. Use a program editor to modify the assembler source file P370XLAT.ASM to reflect the desired translations.

  2. Run the make file MAKE.BAT to build the executable table.

  3. Run the modified DOS program P370XLAT.EXE to load the table into the P370BASE device driver.

If you prefer, a programmer can write a C program to obtain the same results by following the DOS calls in the assembler source.

To load the modified translation table, type p370xlat at the DOS prompt. The modified translation table remains in effect until you load another translation table or restart the PC. If you always need to use the modified translation table, you can add the command p370xlat to your PC’s AUTOEXEC.BAT file.

9.4 Run Adapter Diagnostics

The PRINT370 option of your BARR/RJE, BARR/AFP, or BARR/SPOOL software includes diagnostic tests that you can run from the Installation Description. When you use the PRINT370 device drivers, you can perform diagnostics from DOS with the 370DIAG.EXE file.

Do not attempt to use this diagnostic utility when the BARR/RJE, BARR/AFP, or BARR/SPOOL software is loaded.

Before you use the diagnostic utility, be sure to unload the PRINT370 device drivers. Follow these steps to unload the drivers and run the utility.

  1. Edit the CONFIG.SYS file to comment out the PRINT370 device drivers.

  2. Restart your PC.

  3. At the DOS prompt, type the command 370diag.

If you run the diagnostics without first unloading the device drivers, the diagnostic results will be unreliable and the PC might perform unpredictably.

For more information about adapter diagnostics, see section 4.3.