Re: Host function in SQL/Form 3.0?

From: Lawrence James <James.Lawrence_at_epamail.epa.gov>
Date: Tue, 1 Nov 1994 19:09:25 GMT
Message-ID: <James.Lawrence.31.000E289A_at_epamail.epa.gov>


In article <38b7bo$f0u_at_debbie.cc.nctu.edu.tw> chiu_at_cc.nctu.edu.tw () writes:
>From: chiu_at_cc.nctu.edu.tw ()
>Subject: Host function in SQL/Form 3.0?
>Date: 22 Oct 1994 14:24:56 GMT
 

>Hi,
 

> I'm confused about how to make use the HOST function in SQL/FORM 3.0. Is it
>possible I can tell the result executed by HOST. For example, I want to check
>whether some file exists and write:
 

> :system.message_level := 25;
> HOST('ls file', NO_SCREEN);
> IF ERROR_CODE <> 0 THEN
> .......
> END IF;
 
> Why doesn't it work?
 

> Also if I write my own program which returns 0 or -1 to represent success and
>failure and executed by HOST function, is it possible I can tell the result
>according to the value returned by my program. If yes, how can I do?

I don't think you can get any return values back from the HOST. As I understand it you are creating a child process which goes away when it terminates. Depending on the operating system you may be able to create a global variable in the parent process before starting forms and then modify it in the child process. How you access it from Forms is another problem. Why don't you just use a userexit. Received on Tue Nov 01 1994 - 20:09:25 CET

Original text of this message