Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 63
Sample $CMON Program
!------------------------------------------------------------
! Procedure to process a Change^logoff^message. This
! procedure takes the logoff display text from the input
! message and puts it in the LOGOFF^TEXT array to be read by
! the PROCESS^LOGOFF^MSG procedure when a user tries to log
! off.
!------------------------------------------------------------
PROC CHANGE^LOGOFF^MESSAGE;
BEGIN
STRUCT MSG(*); !template for Change^logoff^message
BEGIN
INT MSGCODE;
STRING DISPLAYTEXT[0:63];
END;
INT .EXT RT^LOGOFF^MESSAGE(MSG) :=
$XADR(BUFFER); !structure pointer to I/O buffer
! Set the logoff display text in the reply:
LOGOFF^TEXT ':=' RT^LOGOFF^MESSAGE.DISPLAYTEXT FOR 64;
CALL REPLYX;
END;