The ZWELCOME Routine
The ZWELCOME Routine
When the Terminal begins execution, the code checks for the existence of a routine called ZWELCOME in the %SYS namespace. If such a routine is found, it is invoked immediately prior to the terminal login sequence, if any. The name of the routine implies its intended use, as a custom identification and welcome message to users.
The installation of ZWELCOME into the %SYS namespace requires an individual with administrator privileges and write access to the CACHESYS database.
The ZWELCOME routine executes in the %SYS namespace with an empty $USERNAME and with $ROLES set to %ALL. Take care to ensure that the failure modes of ZWELCOME are benign. Also, this routine should not modify the $ROLES variable.
Here is a simple example:
ZWELCOME() PUBLIC ;
; Example
Write !
Set ME = ##class(%SYS.ProcessQuery).%OpenId($JOB)
Write "Now: ", $ZDATETIME($HOROLOG, 3, 1), !
Write "Pid/JobNo: ", ME.Pid, "/", ME.JobNumber, !
Write "Priority: ", ME.Priority, !
Quit