Praveen,
On my system (SCO 3.2.4.2) the following works:
DEFINE r_status INTEGER
RUN <command-line> RETURNING r_status
LET r_status = r_status / 256
On SCO, the return status is actually made up of two parts: 8 bits for your
return value and 8 bits for Unix flags. Dividing by 256 rotates the Unix flags
off and shifts your return value to its "proper" position. I don't know this to
be true of all operating systems though! Try it and find out.
--Craig
On Tue, 16 Apr 1996 13:44:53 -0400, praveen@qsun.ho.att.com wrote:
> I have a 4GL program that, executes a shell script
> using RUN statement, the shell scripts exits with a
> value if an error occurs. I want to get that value
> back into my 4GL program. Is there a way to do it ?
>
======================================================================
Craig Kickel | Unix/C/Database Consultant
ckickel@cyberhighway.net | <This space intentionally left blank>
======================================================================