11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> <strong>ObjectScript</strong> Special VariablesTo obtain the namespace name of a specified process, use a SYS.Process class method, asshown in the following example:ZNSPACE "%SYS"WRITE ##CLASS(SYS.Process).%OpenId($JOB).NameSpaceGet()ExampleIn the following example, if the current namespace is not USER, a SET $ZNSPACE commandchanges the current namespace to USER. Note that because of the IF test, the namespacemust be specified in all uppercase letters.SET ns="USER"IF $ZNSPACE=ns {WRITE !,"Namespace already was ",$ZNSPACE }ELSEIF 1=$ZUTIL(90,10,ns) {WRITE !,"Namespace was ",$ZNSPACESET $ZNSPACE=nsWRITE !,"Set namespace to ",$ZNSPACE }ELSE { WRITE !,ns," is not a defined namespace" }QUITSee Also• SET command• ZNSPACE command• Configuring Namespaces in <strong>Caché</strong> System Administration Guide$ZORDERContains the value of the next global node.$ZORDER$ZODescription$ZORDER contains the value of the next global node (in $QUERY sequence, not $ORDERsequence), after the current global reference. If there is no next global node, accessing$ZORDER results in an error, indicating the last global successfullyaccessed by $ZORDER. For further details on errors, refer to $ZERROR.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.480 <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!