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.

ZNSPACEWRITE !,"Current namespace is ",$ZNSPACESET ns="accounting"IF 1=$ZUTIL(90,10,ns) {WRITE !,"Changing namespace to: ",nsZNSPACE nsXECUTE "SET x=$ZUTIL(68,26,1)"WRITE !,"and ",$ZNSPACE," will display at the prompt"}ELSE {WRITE !,"Namespace ",ns," does not exist"SET ns="user"WRITE !,"Changing namespace to: ",nsZNSPACE nsXECUTE "SET x=$ZUTIL(68,26,1)"WRITE !,"and ",$ZNSPACE," will display at the prompt"}NotesNamespaces with Default DirectoriesIf the namespace you select has a default directory on a remote machine, ZNSPACE doesnot change the current directory of your process to that namespace's directory. Thus, yourcurrent namespace becomes the namespace you selected, but your current directory remainsthe directory that was current before you issued the ZNSPACE command.Controlling Namespace DisplayTerminal PromptBy default, the <strong>Caché</strong> Terminal prompt displays the current namespace name. This defaultis configurable:Go to the System Management Portal, select System Configuration, select Advanced Settings,on the pull-down Category list select <strong>ObjectScript</strong>. View and edit the current setting ofPromptShowsNamespace.This also sets the prompt for Telnet windows. You can override this default for the currentprocess by using $ZUTIL(68,26), or system-wide by using $ZUTIL(69,26).$NAME and $QUERY FunctionsThe $NAME and $QUERY functions can return the extended global reference form of aglobal variable, which includes the namespace name. You can control whether these functionsreturn namespace names as part of the global variable name. $ZUTIL(68,7) sets this extendedglobal reference switch for the current process; $ZUTIL(69,7) sets this extended global referenceswitch system-wide. For further information on extended global references, see GlobalStructure in Using <strong>Caché</strong> Multi-Dimensional Storage.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 399

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

Saved successfully!

Ooh no, something went wrong!