IMAGE [ Getting Started With TRANSACT V ] MPE/iX 5.0 Documentation
Getting Started With TRANSACT V
IMAGE
The following program shows the modifications made to the program listed
in Figure 1-17 in order to make it independent of the dictionary.
_______________________________________________________________
| |
| 1 system ex61,base=orders; |
| 2 define(item) order-no x(8): |
| 2.1 cust-no 9(4): |
| 2.2 order-status x(2): |
| 2.21 order-date x(6): |
| 2.3 name x(20): |
| 2.4 street-addr x(20): |
| 2.5 city-state x(20): |
| 2.6 zipcode x(6): |
| 2.61 line-no 9(2): |
| 2.62 part-number x(8): |
| 2.63 quantity i(6); |
| 2.7 list order-no: |
| 2.8 cust-no: |
| 2.9 order-status: |
| 2.91 order-date; |
| 3 move (order-status) = "o"; |
| 4 set(match) list (order-status); |
| 5 find(serial) orderhead,list=(order-no:order-date)|
| 6 ,perform=get-orderdata; |
| 6.1 exit; |
_______________________________________________________________
Figure 7-1. IMAGE access without the dictionary
_____________________________________________________________
| |
| 8 get-orderdata: |
| 9 |
| 9.01 level; |
| 9.1 set(key) list (cust-no); |
| 9.11 list name: |
| 9.12 street-addr: |
| 9.13 city-state: |
| 9.14 zipcode; |
| 9.2 get customer,list=(name:zipcode); |
| 10 set(key) list (order-no); |
| 10.01 list line-no: |
| 10.02 part-number: |
| 10.03 quantity; |
| 11 find(chain) orderline,list=(line-no:quantity)|
| 11.01 ,perform=displayit; |
| 11.1 end(level); |
| 12 return; |
| 13 |
| 14 displayit: |
| 15 |
| 16 display(table) name: |
| 17 order-no: |
| 18 line-no: |
| 19 part-number: |
| 20 quantity; |
| 21 return; |
_____________________________________________________________
Figure 7-1. IMAGE access without the dictionary (cont.)
Lines 2 to 2.63 provide the data item definition normally done centrally
in the dictionary.
Lines 2.7 to 2.9, 9.11 to 9.14, and 10.01 to 10.03 replace the LIST(AUTO)
construct which automatically extracts the record definition from the
dictionary.
Lines 5,9.2, and 11 are modified to replace the LIST=(@) with an item
range list.
MPE/iX 5.0 Documentation