Progress
Programming
Handbook
Input From Files
A data file (not a database table) that contains information on new customers might look like the following example:
This file is in standard Progress format. That is, blanks separate the field values. Field values that contain embedded blanks are surrounded by quotation marks (“ ”). Later sections in this chapter discuss using alternate formats.
You can write a Progress procedure and tell that procedure to get its input from the
p-datf1.d
file. See Figure 7–5.p-chgin.pFigure 7–5: Redirecting the Unnamed Input Stream
![]()
The SET statement, which normally gets its input from the terminal, gets its input from the
p-datf1.d
file. The cust–num field uses the first data item, 90. The name field uses the next quoted data item, “Wind Chill Hockey,” etc. Each time Progress processes a data entry statement, it reads one line from the file.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |