Guardian Programmer's Guide

Table Of Contents
Writing a Requester Program
Guardian Programmer’s Guide 421922-014
21 - 42
Coding the Requester Program
!---------------------------------
! Print the contents of the order
! record on the terminal.
!---------------------------------
PRINT^BLANK;
PRINT^BLANK;
! Copy returned information into ORDER^REC structure:
ORDER^REC ':=' SBUFFER FOR ($LEN(ORDER^REC));
PRINT^STR("ORDER RECORD INFORMATION");
! Print the order number in groups of 6 characters,
! separated by spaces:
PRINT^STR("Order Number: " &
ORDER^REC.ORDER^NUMBER[0] FOR 6 & " " &
ORDER^REC.ORDER^NUMBER[6] FOR 6 & " " &
ORDER^REC.ORDER^NUMBER[12] FOR 6 & " " &
ORDER^REC.ORDER^NUMBER[18] FOR 6 & " " &
ORDER^REC.ORDER^NUMBER[24] FOR 4);
! Print the customer's name:
PRINT^BLANK;
PRINT^STR("Customer Name: " &
ORDER^REC.NAME.LAST FOR 20 &
ORDER^REC.NAME.FIRST FOR 20 &
ORDER^REC.NAME.INITIAL FOR 1);
! Print the customer's address:
PRINT^STR("Customer's Address: " &
ORDER^REC.ADDRESS FOR 48);
! Print the customer's city:
PRINT^STR(" " &
ORDER^REC.CITY FOR 24);
! Print the customer's zip code:
PRINT^STR(" " &
ORDER^REC.ZIP[0] FOR 2 & " " &
ORDER^REC.ZIP[2] FOR 5);
! Print credit-card number in groups of 4 characters,
! separated by spaces:
PRINT^BLANK;
PRINT^STR("Credit-Card Number: " &
ORDER^REC.CCN[0] FOR 4 &
" " & ORDER^REC.CCN[4] FOR 4 &
" " & ORDER^REC.CCN[8] FOR 4 &
" " & ORDER^REC.CCN[12] FOR 4);