Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 19
Coding the Requester Program
!Message to send to $SER1 to request inventory information
!about a specified item:
STRUCT PART^REQUEST;
BEGIN
STRING PART^NUMBER[0:9]; !10-digit part number
END;
!Message to send to $SER2 to process an order:
STRUCT .ORDER^REQUEST;
BEGIN
STRUCT NAME; !name of customer
BEGIN
STRING LAST[0:19];
STRING FIRST[0:19];
STRING INITIAL[0:1];
END;
STRING ADDRESS[0:47]; !address of customer
STRING CITY[0:23]; !city
STRING ZIP[0:7]; !customer's zip code
STRING CCN[0:15]; !customer's credit card number
STRING PART^NUMBER[0:9]; !part number for part ordered
STRING PART^DESC[0:47]; !description of part ordered
INT QTY^ORDERED; !quantity ordered
END;