PreviousNextIndex

INPUT-OUTPUT CLOSE statement

Closes a specified or default stream opened by an INPUT-OUTPUT THROUGH statement.

Syntax

INPUT-OUTPUT [ STREAM stream | STREAM-HANDLE handle ] CLOSE 

STREAM stream
STREAM-HANDLE handle
Example

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.

r-iothru.p
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. 

Note

For more information, see OpenEdge Development: Programming Interfaces.

See also

DEFINE STREAM statement, INPUT-OUTPUT THROUGH statement, Stream object handle


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex