Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 48
Coding the Requester Program
OTHERWISE -> BEGIN
! Unexpected error return from PROCESS_GETPAIRINFO_:
PRINT^STR("Unexpected error ");
END;
END;
END;
!------------------------------------------------------------
! Procedure to process an invalid command. The procedure
! informs the user that the selection was other than "r,"
! "p," "q," or "x."
!------------------------------------------------------------
PROC INVALID^COMMAND;
BEGIN
PRINT^BLANK;
! Inform the user that the selection was invalid and then
! return to prompt again for a valid function:
PRINT^STR ("INVALID COMMAND: " &
"Type either 'r,' 'p,' 'q,' or 'x'");
END;
!------------------------------------------------------------
! Procedure to save the Startup message
!------------------------------------------------------------
PROC START^IT(RUCB,START^DATA,MESSAGE,
LENGTH,MATCH) VARIABLE;
INT .RUCB,
.START^DATA,
.MESSAGE,
LENGTH,
MATCH;
BEGIN
! Copy the Startup message into the START^UP^MESSAGE
! structure and save the message length:
START^UP^MESSAGE.MSG^CODE ':=' MESSAGE[0] FOR LENGTH/2;
MESSAGE^LEN := LENGTH;
END;