Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 12
Application Overview
process obtains the information from the inventory file and returns it to the
requester.
If the user requests to process an order, the requester sends a message to the
process-order server ($SER2). This server uses the information it receives to
update the inventory level in the inventory file and to create an order record and
put it in the orders file.
If the user wants to query an existing order record, then the requester sends a
message to the order-query server ($SER3), which queries the orders file.
See Section 22, Writing a Server Program, for a detailed description of each type of
server process.
Enhancements to the Application
Note that for a typical mail-order or telephone-order company, the application is
incomplete. The following functions would also usually be required:
A means for the receiving department to update the inventory file when new
shipments of goods are received.
A means for the billing department to interrogate the orders file to find out to whom
to send the invoice.
A means for the shipping department to examine the orders file to find out to whom
to send goods.
Before Running the Application
Before you run the application you need to create the inventory file and the orders file
and set up some CLASS MAP DEFINEs required by the application.
You can use the FUP utility to create the inventory and orders files as follows:
1> FUP
-SET TYPE K
-SET BLOCK 2048
-SET REC 100
-SET IBLOCK 2048
-SET KEYLEN 10
-SHOW
TYPE K
EXT ( 1 PAGES, 1 PAGES )
REC 100
BLOCK 2048
IBLOCK 2048
KEYLEN 10
KEYOFF 0
MAXEXTENTS 16
-CREATE \SYS.$APPLS.DATA.PARTFILE
CREATED - \SYS.$APPLS.DATA.PARTFILE
-SET TYPE K