Re: Testing the return code from HOST

From: Ian Parkin <iparkin_at_iris.bt.co.uk>
Date: 27 Jul 93 12:15:20 GMT
Message-ID: <1993Jul27.111520.2178_at_lssec.bt.co.uk>


Another 'kludge' in unix is :-

Within the form :-

host( '<your executable>, NO_SCREEN );
IF ( NOT FORM_SUCCESS )
THEN
     <failure code>;
ELSE
      <success code>;
END IF; Within the executable ( C, shell scripts, etc ) make use of the 'exit' command. 'man 3 exit' from unix will give you more details, but roughly :-

exit( 0 );   /* Exit with success         */
exit( 1 );   /* Exit with failure level 1 */
exit( 2 );   /* Exit with failure level 2 */

N.B. The above are 'C' code extracts.

Also you may need to detect the FRM message that indicates 'Shell command had error'.

Keep 'kludging' ..

IAP Received on Tue Jul 27 1993 - 14:15:20 CEST

Original text of this message