Re: Passing Information from 4ge's?
Posted in 1995
In article <3ku3or$r2n@dale.goodeal.msk.su>,
Vadim J. Nikitin <nvj@goodeal.msk.su> wrote:
>
> 4ge, used as a function, may return its results into standard
>output, like other UNIX processes (if it's not interactive), or into
>text file that must be read by calling program. But to make such a
>reading possible for 4gl programs You must extend your fglgo with
>special functions.
>
Well, the easy way to do it is to have program1 write out a file
in "unload format", i.e. the format that can be read using the "load"
command. So if program1 wants to tell its parent program:
``I succeeded doing stage 1, but stages 2 and 3 both failed.
The total number of records processed was 2049''
Then it might write out the following 4-line file:
1|Y|
2|N|
3|N|
n|2049|
Then the parent program can go:
create temp table feedback ( a char(1), b char(20) ) with no log ;
load from <4-line file> insert into feedback ;
This is just the lazy way to have a 4GL program read a file: make sure
its an unload file, and load it.
Paul