Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Paul Roberts — — source: Informix-list mailing list archive (1991-1998)
What I tend to do is:
create temp table t1 ( i serial, txt char(100) ) with no log ;
run "sed 's/$/|/' datafile > datafile_plus"
load from "datafile_plus" insert into t1 ( txt ) ;
(where 'datafile' is the you want to read in)
Then you can select the data out of temp table t1. The serial "i" will
keep the lines in sequence.
Note that the example assumes that:
(a) The lines in the input file are of bounded length (100 in this case);
(b) There is some character guaranteed NOT to appear in the input file
("|" in this case, but the delimiter can be anything).
This works well for me.
- Paul (not a spokesman)
In article <33E8CFCB.64AA@bst.bls.com>,
BellSouth <Michael.E.Buchanan@bst.bls.com> wrote:
>Does anyone know how to read data from a text file into a 4GL program?
>I want to read data from a configuration file and initialize some
>program variables.
>
>Thanks in advance,
>Mike
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.