Progress
Programming
Handbook


Using the PUT Statement

If you need to prepare a data file in a fixed format, perhaps for use by another system, you can use the PUT statement. The following procedure uses PUT statement to unite to a file:

p-putdat.p
OUTPUT TO p-datfl8.d. 
FOR EACH customer: 
    PUT cust-num AT 1 name AT 10 sales-rep AT 40 SKIP. 
END. 
OUTPUT CLOSE. 

The output from p-putdat.p is written to p-datfl8.d:

p-datf18.d
     1        Lift Line Skiing         HXM 
     2        Urpon Frisbee            DKP 
     3        Hoops Croquet Comp       HXM 
     4        Go Fishing Ltd           SLS 
     5        Match Point Tennis       JAL 
            . 
            . 
            . 

The PUT statement formats the data into the columns specified with the AT options. Only the data is output: there are no labels and no box. The SKIP option indicates that you want each customer’s data to begin on a new line.

For more information on the PUT statement, see the Progress Language Reference .


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