Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

$ZNAME

Contains the current routine name.

Synopsis

$ZNAME
$ZN

Description

$ZNAME contains the name of the routine executing on 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.ProcessQueryOpens in a new tab class method, as shown in the following example:

   WRITE ##class(%SYS.ProcessQuery).%OpenId($JOB).RoutineGet()

The $ZNAME value can be set by the any of the following commands:

  • ZLOAD command

  • ZSAVE command

  • Argumentless ZREMOVE command (sets to a null string)

  • DO command

  • GOTO command with ^routine

FeedbackOpens in a new tab