11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Legacy Commands and FunctionsArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not execute the commandif the postconditional expression is false (evaluates to zero). For further details, referto Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.expressionAny valid <strong>Caché</strong> <strong>ObjectScript</strong> expression that evaluates to an integer greater than 0. <strong>Caché</strong>platforms use the settings of $ZTRAP to clear the program stack back to the setting indicatedby the resulting integer.NotesBehavior of Argumentless ZQUITWhen specified with no arguments, ZQUIT unwinds the entire stack. Execution continuesat the main program level; that is, the level at which the job began, in either programmermode or application mode.ZQUIT does not change the flow of control. Execution continues with the <strong>Caché</strong> <strong>ObjectScript</strong>command that follows ZQUIT. To mimic the errortrap behavior of M/11, an error processingroutine should end with the commandsZQ QUITNote that there are two spaces after ZQ.Here the QUIT command returns to programmer mode if the job began in programmer modeor it exits if the job began in application mode. To log application errors, end your errortrapcode with:ZQ GOTO ^%ETAgain, note the two spaces after ZQ.Behavior of ZQUIT with an ArgumentWhen specified with an argument, ZQUIT does not clear the entire stack, but instead clearsit back one or more levels at which the $ZTRAP special variable was set. The number oflevels is specified by the expression argument, which must evaluate to an integer greater than0. $ZTRAP directs error trapping to the routine to which it is set.756 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!