Re: Host function in SQL/Form 3.0?

From: Tommy Wareing <p0070621_at_brookes.ac.uk>
Date: 24 Oct 1994 09:24:50 GMT
Message-ID: <38fuh2$g8b_at_cs3.brookes.ac.uk>


In article <38b7bo$f0u_at_debbie.cc.nctu.edu.tw>, chiu_at_cc.nctu.edu.tw () says:
> 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;
>
> 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?

HOST sets either FORM_SUCCESS or FORM_FAILURE according to the return code of the process. ie. a return code of 0 sets FORM_SUCCESS, and anything else sets FORM_FAILURE.

According to the Forms 3.0 manual if can also set FORM_FATAL, but to be honest, I don't see how this can be done.

  _________________________   _________________________
 /  Tommy Wareing          \ /                         \
|  p0070621_at_brookes.ac.uk   X   Oh No! More Amberites!  |
 \  0865-483389            / \       A. Lemming        /
  ~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Mon Oct 24 1994 - 10:24:50 CET

Original text of this message