Caché ObjectScript Reference
$ZNAME
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Contains the current routine name.
Synopsis
$ZNAME
$ZN
Description
$ZNAME contains the routine name of the current process. Routine names are case-sensitive. If no routine is currently executing, $ZNAME contains a null string.
This special variable cannot be modified using the SET command. Attempting to do so results in a <SYNTAX> error.
To return the routine name for a specified process, use a SYS.Process class method, as shown in the following example:
   /* Execution of this example requires access permission to the %SYS namespace */
   ZNSPACE "%SYS"
   WRITE ##class(SYS.Process).%OpenId($JOB).RoutineGet()
 
To run this example from the documentation, UnknownUser must have assigned the %DB_CACHESYS role.
The $ZNAME value can be set by the any of the following commands: