INPUT-OUTPUT STREAM stream STREAM-HANDLE handle CLOSESTREAM streamThe name of the stream you want to close. If you do not name a stream, the AVM closes the default stream used by an INPUT-OUTPUT THROUGH statement.STREAM-HANDLE handleThe handle to the stream you want to close. If you do not specify the handle, the AVM closes the default stream used by an INPUT-OUTPUT THROUGH statement.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.
FOR EACH Item NO-LOCK WHERE Item.ItemNum < 10:DISPLAY Item.ItemNum Item.Price LABEL "Price before recalculation".END.INPUT-OUTPUT THROUGH r-iothru UNBUFFERED.FOR EACH Item WHERE Item.ItemNum < 10:EXPORT Item.Price.SET Item.Price.END.INPUT-OUTPUT CLOSE.
FOR EACH Item WHERE Item.ItemNum < 10 WITH COLUMN 40:DISPLAY Item.ItemNum Item.Price LABEL "Price after recalculation".END.For more information, see OpenEdge Development: Programming Interfaces.
© 2012 Progress Software Corporation and/or its subsidiaries or affiliates. |