


The MPE/iX shell does not provide a way to print files, so we have provided a method described here. Included on the ACUCOBOL-GT media are the following three files:
lp
LPMPE
prserial
"lp" is a script that simulates the UNIX "lp" shell command. The "lp" script should be located in a directory somewhere in your MPE/iX shell PATH. For example:
shell/iX> export PATH="$PATH:/ACUCOBOL/PUB/bin"
"LPMPE" and "prserial" should be located in a directory somewhere in your HPPATH. For example:
:SETVAR HPPATH HPPATH+",PUB.ACUCOBOL"
The "lp" script also requires that a link called PRSERIAL be made to "prserial". This link is automatically created by the ACUCOBOL-GT install script in the /ACUCOBOL/PUB directory. If you need to create the link yourself from the shell, use the following command:
shell/iX> ln -s /ACUCOBOL/PUB/prserial PRSERIAL
The usage for the lp command is:
lp [-d dest] [-n number] [-p priority] [-T type] [-w] [files...]
-d dest Destination or output device. The default is lp.
-n number Number of copies to print. The default is 1 on MPE.
-p priority Print priority. The default is 8 on MPE.
-T type Printer Type: system or serial. The default is system. In place of system, you can specify the system method - fcopy or print. Use serial for a file which contains printer control commands, such as printing a file to a LaserJet printer.
-w Write message after the files have been printed.
To help print files using ACUCOBOL-GT, we have provided a sample configuration file called "cblconfig". This file contains sample settings for assigning the PRINTER device name to the MPE/iX system spooler. For example:
PRINTER -P %TMP% lp %TMP% ; rm %TMP%
If your COBOL application writes to a file assigned to "PRINTER", this line in the configuration file will create a file with a unique name. It will substitute the same name for the phrase "%TMP%" every place on the line that the phrase is found. The first word after the "-P" is treated as the name of a file to write to. The second and following words are treated as the program to run.
The above example will run the "lp" command on the output file, then remove the file. If desired, you may also specify any of the arguments to "lp". For more information, see the ACUCOBOL-GT User's Guide, section 2.8, "File Name Interpretation."