Hi all,

I am trying to detect the success of failure of a BASIC program when running 
from UNIX. I was going to use @SYSTEM.RETURN.CODE setting to do this, hoping 
that the exit status of uvsh would reflect the value set for 
@SYSTEM.RETURN.CODE but it appears this is not the case. Does anyone know if 
this works and I am just missing something silly?

Possibly VOC entry process mode setting or something?

e.g.

uvsh "MYBASICPROGRAM SUCCESS" would return exit status of 0

uvsh "MYBASICPROGRAM FAILURE" would return exit status 1

uvsh "MYBASICPROGRAM" would return 9

SUBROUTINE MYBASICPROGRAM
@SYSTEM.RETURN.CODE = 9
Get(Arg.) EXITSTATUS ELSE STOP
BEGIN CASE
CASE EXITSTATUS = 'SUCCESS'
   @SYSTEM.RETURN.CODE = 0
CASE EXITSTATUS = "FAILURE'
  @SYSTEM.RETURN.CODE = 1
END CASE
RETURN

This is a contrived example, but shows what I am trying to do with 
@SYSTEM.RETURN.CODE.....

Cheers

Phil.


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to