PreviousNextIndex

PUT statement

Sends the value of one or more expressions to an output destination other than the terminal.

Syntax

PUT 
  [ STREAM stream | STREAM-HANDLE handle ] 
  [ UNFORMATTED ] 
  [     { expression 
            [ FORMAT string ] 
            [ { AT | TO } expression ] 
        } 
     |  SKIP [ ( expression ) ]   
     |  SPACE [ ( expression ) ]  
  ] ... 

PUT [ STREAM stream | STREAM-HANDLE handle ] CONTROL expression ... 

STREAM name
STREAM-HANDLE handle
UNFORMATTED
expression
FORMAT string
AT expression
TO expression
SKIP [ ( expression ) ]
SPACE [ ( expression ) ]
CONTROL expression
Example

This procedure creates a text file that contains the names of each customer. The names are separated from each other by a slash (/). The entire file consists of one long line.

r-put.p
DEFINE STREAM s1. 
OUTPUT STREAM s1 TO cus.dat. 
FOR EACH Customer NO-LOCK: 
  PUT STREAM s1 name "/". 
END. 
OUTPUT STREAM s1 CLOSE. 

Notes
See also

DEFINE STREAM statement, DISPLAY statement, EXPORT statement, OUTPUT TO statement, PAGE statement, PUT SCREEN statement, Stream object handle


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex