INPUT-OUTPUT STREAM stream STREAM-HANDLE handleTHROUGH program-name VALUE ( expression )argument VALUE ( expression )ECHO NO-ECHOMAP protermcap-entry NO-MAPUNBUFFEREDNO-CONVERTCONVERTTARGET target-codepageSOURCE source-codepageSTREAM streamSpecifies the name of a stream. If you do not name a stream, the unnamed stream is used. See the DEFINE STREAM statement reference entry and 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.VALUE ( expression )Or, it is an expression whose value is an argument you want to pass to the UNIX program. INPUT-OUTPUT THROUGH passes the value of expression as a character string.MAP protermcap-entry NO-MAPThe protermcap-entry value is an entry from the PROTERMCAP file. MAP allows you to send output to and receive input from an I/O stream that uses different character translation than the current 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.Allows you to modify the character conversions occurring between the UNIX program and ABL. By default, the INPUT-OUTPUT THROUGH statement converts characters from the Stream Code Page (-cpstream) parameter to the code page specified with the Internal Code Page (-cpinternal) parameter as data received from program-name. As data is passed to program-name, then INPUT-OUTPUT THROUGH converts from the -cpinternal to -cpstream. If you specify SOURCE source-codepage alone, the conversion accepts source-codepage as the code page name of the UNIX program (instead of -cpstream). If you specify TARGET target-codepage, the conversion accepts target-codepage as the internal code page (instead of -cpinternal). If you specify both SOURCE source-codepage and TARGET target-codepage, it converts characters from the source-codepage to target-codepage (instead of -cpstream to -cpinternal).TARGET target-codepageSpecifies the target 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).SOURCE target-codepageSpecifies the source 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).Specifies that no character conversions occur between the UNIX program and ABL. By default, the INPUT-OUTPUT THROUGH statement converts characters from the -cpstream code page to the -cpinternal code page as data is received from program-name. As data is passed to program-name, then INPUT-OUTPUT THROUGH converts from the -cpinternal to -cpstream.This procedure uses a C program to recalculate the price of each item in inventory. Specifically, the C program increases the price of each item by 3% or by 50 cents, whichever is greater. The INPUT-OUTPUT THROUGH statement tells the procedure to get its input from, and send its output to, the r-iothru.p procedure. The INPUT-OUTPUT CLOSE statement resets the input source to the terminal and the output destination to the terminal.You must unpack the C program from the proguide subdirectory and compile it before you can use it with the r-iothru.p procedure. If you do not have a C compiler, do not try this example.Following is the C program used by the r-iothru.p procedure:
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.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |