HOSTCODE

HOSTCODE built-in variable contains the return code of the last OS command.

SET hplsql.onerror = SETERROR;
 
HOST 'echo hello, world';
IF HOSTCODE <> 0 THEN
  PRINT 'Error';
END IF;

Notes:

For more information, see Error Handling.

Compatibility: HPL/SQL Extension.

See also: