In DB3 you only need to:
SET DEVICE TO PRINT
SET CONSOLE OFF
SET PRINTER ON
SET PRINTER TO ("File.txt")
...
... Your statements
...
SET PRINTER OFF
SET CONSOLE ON
SET DEVICE TO SCREEN
SET PRINTER TO
I'm not experiencing problems printing to a PCL5 printer from DOS. The
printer driver I wrote for dBase is a bit more versatile in able to
provide formatted output:
******************************************************************************
PROCEDURE RESET_PRD *** ROUTINE FOR GIC LIST 910204 ***
******************************************************************************
@prow(),COL() say "(10U(s128t10vpsb12H" && SET LASERJET PRINTER TO
12 PITCH
* "&l8C(s12H"
SET MARGIN TO 0 && SET PRINTER MARGIN TO 0
RETURN
******************************************************************************
PROCEDURE PCENTRE *** CENTRE PRINTER STRING ***
******************************************************************************
PARAMETERS ROW,string
store int(48-(len(string)/2)) to col
@PROW()+ROW,COL say string
RETURN
******************************************************************************
PROCEDURE QCENTRE *** CENTRE ? PRINT STATEMENTS - 5:06pm May
08,1991 ***
******************************************************************************
*EXAMPLES OF PROCEDURE USAGE TO PRINT TO SCREEN OR PRINTER WITH A ?
STATEMENT
* DO QCENTRE WITH "&NAME"
* DO QCENTRE WITH HEADER2
* DO QCENTRE WITH "ASSETS"
******************************************************************************
PARAMETERS STRING
STORE 0 TO TAB
IF FLAG=0 && IF PRINT OFF
STORE INT (40-(LEN(STRING)/2)) to TAB
ELSE && IF PRINT ON
STORE INT(48-(LEN(STRING)/2)) to TAB
ENDIF
?SPACE(TAB)
?? STRING
RETURN
******************************************************************************
PROCEDURE RESET_PRD *** SET PRINTER TO 12 PITCH 9:30am Mar 09,1991
***
******************************************************************************
SET DEVICE TO PRINT
@PROW(),COL() SAY "E" && RESET PRINTER
@PROW(),COL() SAY "(10U(s128t10vpsb12H" && SET LASERJET PRINTER TO
12 PITCH
@PROW(),COL() SAY "&l6E" && SET TOP MARGIN TO 6
LINES
@PROW(),COL() SAY "&l66F" && SET PAGE LENGTH TO 66
LINES FROM TOP OF PAGE
* "&l8C(s12H"
SET DEVICE TO SCREEN
RETURN
******************************************************************************
PROCEDURE SET_PRD *** SET PRINTER FORMAT TO 1" MARGINS Mar 09,1991
***
******************************************************************************
SET DEVICE TO PRINT
@PROW(),COL() SAY "E" && RESET PRINTER
@PROW(),COL() SAY "(10U(s128t10vpsb12H" && SET LASERJET PRINTER
TO 12 PITCH
@PROW(),COL() SAY "&l6E" && SET TOP MARGIN TO 6
LINES
@PROW(),COL() SAY "&l58F" && SET TEXT LENGTH TO 58
LINES FROM TOP OF PAGE
SET DEVICE TO SCREEN
&&beginmod:0 "^[(10U^[(s128t10vpsb12H" && 12 pitch courier
&&beginmod:0 "^[(10U^[(s128t12vpsb10H" && 10 pitch courier
&&beginmod:0 "^[(10^[(s128t15vpsb8.3H" && 08 pitch courier
&&beginmod:0 "^[(10U^[(s130t8.5vpsb16.66H" && 16 pitch linePrinter
RETURN
This works okay for now, while PCL5 printers are still available.