Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 62
Sample $CMON Program
ELSE
! Otherwise, accept the request only if from operator group:
BEGIN
IF REQUESTING^GROUPID = 255 THEN
DELUSER^REPLY.REPLYCODE := 0
ELSE
BEGIN
DELUSER^REPLY.REPLYCODE := 1;
DELUSER^REPLY.REPLYTEXT ':=' "Must be operator";
END;
END;
! Send reply to TACL process:
CALL REPLYX(DELUSER^REPLY,$LEN(DELUSER^REPLY));
END;
!------------------------------------------------------------
! Procedure to process a Change^logon^message. This
! procedure takes the logon display text from the input
! message and puts it in the LOGON^TEXT array to be read by
! the PROCESS^LOGON^MSG procedure when a user tries to log
! on.
!------------------------------------------------------------
PROC CHANGE^LOGON^MESSAGE;
BEGIN
STRUCT MSG(*); !template for Change^logon^message
BEGIN
INT MSGCODE;
STRING DISPLAYTEXT[0:63];
END;
INT .EXT RT^LOGON^MESSAGE(MSG) :=
$XADR(BUFFER); !structure pointer to I/O buffer
! Set the logon display text in the reply:
LOGON^TEXT ':=' RT^LOGON^MESSAGE.DISPLAYTEXT FOR 64;
CALL REPLYX;
END;