Guardian Programmer's Guide

Table Of Contents
Writing a Server Program
Guardian Programmer’s Guide 421922-014
22 - 17
The Part-Query Server ($SER1)
!------------------------------------------------------------
! Procedure for displaying file-system error numbers on the
! terminal. The parameters are the file name and its length
! and the error number. This procedure is used when the
! file is not open, so there is no file number for it.
!
! The procedure also stops the program after displaying the
! error message.
!------------------------------------------------------------
PROC FILE^ERRORS^NAME(FNAME:LEN,ERROR);
STRING .FNAME;
INT LEN;
INT ERROR;
BEGIN
! Compose and print the message:
START^LINE;
PUT^STR("File system error from $SER1 ");
PUT^INT(ERROR);
PUT^STR(" on file " & FNAME FOR LEN);
CALL WRITEX(TERM^NUM,SBUFFER,@S^PTR '-' @SBUFFER);
! Terminate the program:
CALL PROCESS_STOP_;
END;