OUTPUT STREAM stream STREAM-HANDLE handle TOPRINTER printer-nameopsys-fileopsys-deviceTERMINALVALUE ( expression )"CLIPBOARD"LOB-DIR constant VALUE ( expression )NUM-COPIES constant VALUE ( expression )COLLATELANDSCAPE PORTRAITAPPENDBINARYECHO NO-ECHOKEEP-MESSAGESNO-MAP MAP protermcap-entryPAGEDPAGE-SIZE constant VALUE ( expression )UNBUFFEREDNO-CONVERTCONVERTTARGET target-codepageSOURCE source-codepageSTREAM streamSpecifies the name of a stream. If you do not name a stream, the AVM uses the unnamed stream. See the DEFINE STREAM statement reference entry and the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.STREAM-HANDLE handleSpecifies the handle to a stream. If handle it is not a valid handle to a stream, the AVM generates a run-time error. Note that stream handles are not valid for the unnamed streams. See the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams and stream handles.PRINTER printer-name
\\fs_dev\hplas4The absolute or relative pathname of a file to which you want to direct output. If you specify a relative pathname, the AVM locates the pathname relative to the current working directory. The pathname can contain up to 255 characters. If a file with the specified pathname already exists, the AVM overwrites it. The pathname can contain Unicode characters. See OpenEdge Development: Internationalizing Applications for more information about Unicode.VALUE ( expression )Specifies the directory in which you want the EXPORT statement to write large object data files (such as BLOB and CLOB data files). The constant and expression arguments are character expressions that evaluate to an absolute pathname or a relative pathname (relative to the directory specified in opsys-file).If the specified character expression evaluates to either the Unknown value (?) or a directory that does not exist, or you do not have permission to write to the specified directory, the AVM raises the ERROR condition.The LOB-DIR option is valid only when you specify an operating system file as the output destination.Specifies the number of copies to print. The constant or expression parameters must evaluate to a positive integer. This option is supported in Windows only, and only with printer drivers that support multi-copy printing. Specifying the number of copies to print overrides, but does not change, the number of copies defined in the default print context.
OUTPUT TO PRINTER NUM-COPIES 3.
OUTPUT TO PRINTER LANDSCAPE NUM-COPIES 3.MAP protermcap-entry NO-MAPThe protermcap-entry value is an entry from the PROTERMCAP file. Use MAP to send output to a device that requires different character mappings than those in effect for the current output stream. Typically, protermcap-entry is a slash-separated combination of a standard device entry and one or more language-specific add-on entries (MAP laserwriter/french or MAP hp2/spanish/italian, for example). The AVM uses the PROTERMCAP entries to build a translation table for the stream. Use NO-MAP to make the AVM bypass character translation altogether. See OpenEdge Deployment: Managing ABL Applications for more information on PROTERMCAP. See OpenEdge Development: Internationalizing Applications for more information on national language support.Formats the output into pages. Form feeds are represented by ^L (CTRL+L). When output is PAGED, a page break occurs every 56 lines. PAGED is automatic for output to a printer.Specifies the number of lines per page. The expression is a constant, field name, variable name, or expression whose value is an integer. The default number of lines per page is 56. If you are using the TERMINAL option to direct output to the terminal, the default number of lines per page is the number of lines of TEXT widgets that fit in the window. If you specify a non-zero value for n, then the PAGED option is assumed. If you specify PAGE-SIZE 0, the output is not paged in character mode; in a graphical interface, the default page size is used.Allows you to modify the character conversions occurring between the external file and memory. By default, the OUTPUT TO statement converts characters from the code page specified with the Internal Code Page (-cpinternal) parameter to the code page specified with the Stream Code Page (-cpstream) parameter . If you specify SOURCE source-codepage alone, the conversion accepts source-codepage as the code page name used in memory (instead of -cpinternal). If you specify TARGET target-codepage, the conversion accepts target-codepage as the code page of the external file (instead of -cpstream). If you specify both SOURCE source-codepage and TARGET target-codepage, it converts characters from the source-codepage to target-codepage (instead of -cpinternal to -cpstream).TARGET target-codepageSpecifies the target code page of the character conversion (replacing -cpstream). The name that you specify must be a valid code page name available in the DLC/convmap.cp file (a binary file that contains all of the tables that ABL uses for character management).SOURCE target-codepageSpecifies the source code page of the character conversion (replacing -cpinternal). The name that you specify must be a valid code page name available in the DLC/convmap.cp file (a binary file that contains all of the tables that ABL uses for character management).The r-out.p procedure sends Customer data to a file. The OUTPUT TO statement directs subsequent output to a file, so all statements that normally send output to the terminal send output to that file. After all the Customer data has been displayed to the file, the OUTPUT CLOSE statement resets the output destination to its previous state, usually the terminal. The final DISPLAY statement displays Finished on the terminal because that is the new output destination.The r-termpg.p procedure sends Customer data to the terminal. The OUTPUT TO TERMINAL PAGED statement directs output to the terminal in a paged format; all statements send output to the terminal one page at a time.
If you send data to a file and you plan to use that data file later as input to a procedure, consider using the EXPORT statement. See the INPUT FROM statement reference entry for more information.
On UNIX, if you want to use a print spooler with spooler options, you can use the Printer (-o) startup parameter to specify the options. See OpenEdge Deployment: Startup Command and Parameter Reference for more information on the Printer startup parameter.
PrinterFont n = facename, size = screen-point-sizeOUTPUT TO PRINTER uses the PrinterFont setting. OUTPUT TO LPTn uses the corresponding PrinterFontn entry. The facename parameter in a PrinterFont setting represents any valid Windows font supported on your system. If you specify a font that your printer does not support, printing might take a long time and yield unexpected results. The screen-point-size setting represents the point size, in screen units, for the font. The AVM converts the point size to logical printer units.
OUTPUT TO LPTn in Windows performs the following processing:
Checks the current environment (either the Registry, or the [Startup] section in the initialization file) for a corresponding PrinterFontn setting (PrinterFont1 is for LPT1, etc.). If there is a valid corresponding PrinterFontn setting, the AVM uses the font specified for the print job. If there is no corresponding PrinterFontn setting or the setting specifies a non-existent font, the AVM uses the "courier new" font for the job and calculates the font height to fit 60 lines on a page. If there is no point size specified for the font in the PrinterFontn setting, the AVM uses the default size for the printer.For information on providing additional clipboard reading and writing capabilities to your application, see OpenEdge Development: Programming Interfaces and the CLIPBOARD system handle reference entry.
For any character conversions to occur, all of the necessary conversion tables must appear in convmap.cp (a binary file that contains all of the tables that ABL uses for character management).
If you specify a value of “undefined” for either source-codepage or target-codepage, no character conversion is performed.
The OpenEdge ADE toolset provides a portable solution for printing text files. The solution is a procedure called _osprint.p and it is located in the adecomm directory in the OpenEdge product directory (DLC). The _osprint.p procedure sends a specified text file to the default printer as paged output. For more information on the _osprint.p procedure, see OpenEdge Development: Programming Interfaces.
For more information on changing your output destination, see OpenEdge Development: Programming Interfaces.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |