Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 14
Coding the Requester Program
21 Writing a Requester Program
Coding the Requester Program
The requester program shown at the end of this section consists of several
procedures, as shown in Figure 21-5.
In addition to the procedures shown in Figure 21-5, the error handling procedures
FILE^ERRORS and FILE^ERRORS^NAME provide file-system error handling for most
of the other procedures. The WRITE^LINE procedure helps simplify terminal display.
The following paragraphs describe the major procedures in detail.
The Initialization Procedures
The Initialization procedures include the REQUESTER (MAIN), INIT, and
GET^COMMAND procedures. These procedures perform two functions: application
initialization and main-menu handling.
The INIT procedure performs application initialization. It reads the Startup message,
opens the home terminal, and calls the CREATE^AND^OPEN^SERVER procedure
once for each server process.
The GET^COMMAND procedure displays the main menu on the terminal, allowing the
user to choose the database operation to be performed or to exit the program.
Figure 21-5. Relationship Between Major Procedures in the Requester Program
VST107.VSD