Guardian Programmer's Guide

Table Of Contents
Writing a Command-Interpreter Monitor ($CMON)
Guardian Programmer’s Guide 421922-014
23 - 43
Sample $CMON Program
!------------------------------------------------------------
! Procedure to process the Config^msg message. Accepts the
! current default values in all cases.
!------------------------------------------------------------
PROC PROCESS^CONFIG^MSG;
BEGIN
STRUCT .CONFIG^TEXT^REPLY;
BEGIN
INT REPLYCODE;
STRING REPLYTEXT[0:63];
END;
! Prepare the reply message:
CONFIG^TEXT^REPLY.REPLYCODE := 1;
CONFIG^TEXT^REPLY.REPLYTEXT[0] ':=' " ";
CONFIG^TEXT^REPLY.REPLYTEXT[1] ':='
CONFIG^TEXT^REPLY.REPLYTEXT[0] FOR 63;
! Send the reply to the TACL process:
CALL REPLYX(CONFIG^TEXT^REPLY,$LEN(CONFIG^TEXT^REPLY));
END;