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.

ArgumentspcAn 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>.routineA new name under which to save the routine. If a routine by that name already exists, <strong>Caché</strong>overwrites it. Note that you are not asked to confirm the overwrite. If you omit routine, <strong>Caché</strong>saves the routine under its current name.ExampleThis example saves the currently loaded routine with "Test" as its new name.SET x="ZSAVE Test"XECUTE xNotesWhere to Use ZSAVEThe ZSAVE command works only when entered at the programmer prompt or when codedwithin an XECUTE statement in a routine. It should not be coded into the body of a routinebecause its operation would effect the execution of that routine. If you code ZSAVE in aroutine, but outside of an XECUTE statement, that ZSAVE saves the current program.ZSAVE and Routine RecompilationZSAVE recompiles the saved routine.ZSAVE with % RoutinesYou receive a error if you try to ZSAVE a %routine to a remote dataset, evenif that dataset is the current dataset for the process. The percent sign prefix is used for thenames of non-modifiable routines, such as system utilities.Concurrent ZSAVE OperationsZSAVEWhen using ZSAVE in a networked environment, a situation may occur in which two differentjobs might concurrently save a routine and assign it the same name. This operation has thepotential for one routine overwriting part of the other, producing unpredictable results. When<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 405

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

Saved successfully!

Ooh no, something went wrong!