Kbase P8166: How to print a DOS file from a 4GL client to output the graphic characters of the DOS IBM850 code pa
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/05/2008 |
|
Status: Verified
GOAL:
How to print a DOS file from a 4GL client to output the graphic characters of the DOS IBM850 code page file.
FACT(s) (Environment):
Windows
Progress 9.1C
CHANGE:
Moved a version 6 character application to version 9.1C
FIX:
Using OUTPUT TO PRINTER from a windows application causes the printer to use the default windows code page, 1252 or ISO8859-1.
Using OUTPUT TO PRINTER from a DOS application causes the printer to use the DOS code page of IBM850.
As these two code pages do not include the same graphic characters, windows prints different character symbols than DOS.
To print a DOS file from a 4GL client and output the graphic characters of the DOS IBM850 code page, use the OS-COMMAND statement:
/********/
DEFINE VARIABLE cPrinterName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cPrinterPort AS CHARACTER NO-UNDO.
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
ASSIGN
cPrinterName = SESSION:PRINTER-NAME
cPrinterPort = SESSION:PRINTER-PORT
cFileName = "C:\PROGRESS\WRK\SomeFile.txt".
/* print to the session's printer name */
OS-COMMAND COPY FileName PrinterName.
/* OR */
/* print to the session's printer port */
OS-COMMAND COPY FileName PrinterPort.
/********/