Thanks Brad, That idea had crossed my mind, alternatively capturing some output as this is a non-interactive process.... but liked the simplicity of @SYSTEM.RETURN.CODE....
Maybe Mark Baldridge would have some ideas being the expert he is and an old colleague at VMARK last century ;-) But I suspect the @SYSTEM.RETURN.CODE is getting lost inside the uvsh executable and not returned to UNIX.... Cheers > -----Original Message----- > From: [email protected] [mailto:u2-users- > [email protected]] On Behalf Of [email protected] > Sent: Thursday, 17 March 2011 10:20 a.m. > To: U2 Users List > Subject: Re: [U2] [UV] Uvsh exit status and @SYSTEM.RETURN.CODE > > Phil, > > I wrestled with this one quite a while a few years back under ud.. Never > figured out a code-only solution. Ended up writing exit codes to a text file > that the script reads when the program completes. If noone has any other > ideas you like, ping me and I can explain what I did. > > Brad. > > > > From: Phil Walker <[email protected]> > To: U2 Users List <[email protected]> > Date: 03/16/2011 04:02 PM > Subject: [U2] [UV] Uvsh exit status and @SYSTEM.RETURN.CODE > Sent by: [email protected] > > > > 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 > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > U.S. BANCORP made the following annotations > --------------------------------------------------------------------- > Electronic Privacy Notice. This e-mail, and any attachments, contains > information that is, or may be, covered by electronic communications privacy > laws, and is also confidential and proprietary in nature. If you are not the > intended recipient, please be advised that you are legally prohibited from > retaining, using, copying, distributing, or otherwise disclosing this > information in any manner. Instead, please reply to the sender that you have > received this communication in error, and then immediately delete it. Thank > you in advance for your cooperation. > > > > --------------------------------------------------------------------- > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
