Progress
Language Reference


INPUT-OUTPUT CLOSE Statement

Interfaces
OS
SpeedScript
All
NT, UNIX only
Yes

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

SYNTAX

INPUT-OUTPUT [ STREAM stream ] CLOSE 

STREAM stream

The name of the stream you want to close. If you do not name a stream, Progress closes the default stream used by an INPUT-OUTPUT THROUGH statement.

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 WHERE item-num < 10:
    DISPLAY item-num price LABEL "Price before recalculation".
END.

INPUT-OUTPUT THROUGH r-iothru UNBUFFERED.

FOR EACH item WHERE item-num < 10:
    EXPORT price.
    SET price.
END.

INPUT-OUTPUT CLOSE.

FOR EACH item WHERE item-num < 10 WITH COLUMN 40:
    DISPLAY item-num price LABEL "Price after recalculation".
END. 

NOTE

For more information, see the Progress Programming Handbook .

SEE ALSO

DEFINE STREAM Statement, INPUT-OUTPUT THROUGH Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095