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.

DescriptionYou can use the ^$ROUTINE structured system variable as an argument to the $DATA,$ORDER, and $QUERY functions to return routine information from the current namespace(the default) or a specified namespace.ParametersnspaceThis optional parameter allows you to specify a global in another namespace by using extendedglobal reference. You can specify the namespace name either explicitly, or by specifying animplied namespace. The namespace name must be specified as a quoted string. Namespacenames are case-insensitive. You can use either bracket syntax [“USER”] or environmentsyntax |“USER”|. No spaces are allowed before or after the nspace delimiters. You can usethe $ZNSPACE special variable to determine the current namespace, the $ZUTIL(90,10)function to determine if a namespace is defined, and the ZNSPACE command to change thecurrent namespace. For further information on extended global references, see Global Structurein Using <strong>Caché</strong> Multi-Dimensional Storage.routine_nameAn expression that evaluates to a string containing the name of a routine.ExamplesThe following are examples of using ^$ROUTINE as an argument to the $DATA, $ORDER,and $QUERY functions.As an Argument to $DATA$DATA(^$|nspace|ROUTINE(routine_name))^$ROUTINE^$ROUTINE as an argument to $DATA returns an integer value that specifies whether theroutine_name exists as a node in ^$ROUTINE. The integer values that $DATA can returnare shown in the following table.Value01MeaningRoutine name does not existRoutine name existsThe following example tests for the existence of a routine in the default namespace:<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 511

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

Saved successfully!

Ooh no, something went wrong!