How to Print from FoxPro for UNIX

ID: Q119883

The information in this article applies to:

SUMMARY

FoxPro for UNIX allows both the SCO FoxBASE+ style of printing and the standard FoxPro style of printing.

MORE INFORMATION

SCO FoxBASE+ for UNIX allows you to print with these methods:

Print to Printer

   SET PRINT TO "lp -s -dlaser"
   SET PRINT ON
   DISPLAY STATUS TO PRINTER
   SET PRINTER OFF

Print to File

   SET PRINTER TO 'cat > test'
   * To append to an existing file, the FoxBASE+ command
   * would read: SET PRINTER TO 'cat >> test'
   SET PRINTER ON
   LIST STATUS TO PRINTER
   SET PRINTER OFF
   MODIFY FILE test

Note also that the config.fx file for FoxBASE+ can contain the line

   SPOOLER=cat > /dev/lp0

which directs output to the printer device known as lp0 (the default line printer device number).

For local printing, the SCO FoxBASE+ manuals state that the lprint command can be used. For example:

   ! lprint <filename>


FoxPro for UNIX allows you to print with the FoxBASE+ methods as well as the following methods:

Print to Printer

   SET DEVICE TO PRINTER
   SET PRINTER TO  "lp -s -dlaser"
   SET PRINT ON
   DISPLAY STATUS TO PRINTER
   SET PRINTER TO
   SET DEVICE TO SCREEN

Print to File

   SET DEVICE TO PRINTER
   SET EXCLUSIVE OFF
   SET PRINTER TO FILE junk.txt
   SET PRINTER ON
   LIST STATUS TO PRINTER NOCONSOLE
   SET PRINTER TO            && flush the print buffer
   SET DEVICE TO SCREEN

Note also that "lp -dlaser -s" is a valid method of directing output to the printer called "laser". (The -s switch suppresses the display of the print job identification number.)

You can also include _PRN="lp -s -dlaser" in the config.fpu file for FoxPro for UNIX.

REFERENCES

SCO FoxBASE+ "Configuration Guide," pages 5-1 through 5-10

FoxPro for UNIX "Installation and Configuration Guide," pages 23-24

SCO Operating System "User's Reference" and "System Administrator's Reference"

Additional reference words: FoxUnix 2.60 compatible KBCategory: kbprint kbprg kbcode KBSubcategory:

Last Reviewed: August 28, 1995