Try OpenEdge Now
skip to main content
Programming Interfaces
Input/Output Processes : Alternate I/O Sources : Changing the input source of a procedure : Input from files
 
Input from files
A data file (not a database table) that contains information on new customers might look like i-datf1.d.
i-datf1.d
90 "Wind Chill Hockey" BBB
91 "Low Key Checkers" DKP
92 "Bing's Ping Pong" SLS
This file is in standard ABL format. That is, blanks separate the field values. Field values that contain embedded blanks are surrounded by quotation marks (" "). See Convertingnonstandard input files for information on using alternate formats.
You can write an ABL procedure and tell that procedure to get its input from the i-datf1.d file, as shown in the following figure.
Figure 27. Redirecting the unnamed input stream
The SET statement, which normally gets its input from the terminal, gets its input from the i-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 ABL processes a data entry statement, it reads one line from the file.
Note: For information about the size limit of input files, see the input/output limits section of OpenEdge Deployment: Managing ABL Applications.