Getting Started with TRANSACT (32247-90007)
108 Chapter6
Data Structures
Figure 6-20. Illustration of Dynamic Data Storage
1 system ex60,base=orders;
2 define(item) temp-part x(8):
3 from-part x(8):
4 to-part x(8);
5 define(item) count i(4),init=0:
6 dun x(4),init="no":
7 yes x(4),init="yes":
8 no x(4),init="no";
9 define(item) parts-this-pass i(4):
10 no-of-parts i(4);
11 define(item) start-of-parts @;
12 list temp-part:
13 parts-this-pass:
14 no-of-parts;
15 list count:
16 dun:
17 yes:
18 no;
19 list start-of-parts;
20 repeat
21 do
22 list part-number;
23 get(serial) parts,list=(part-number),status;
24 if status = 0
25 then let (count) = (count) + 1
26 else let (dun) = (yes);
27 doend
28 until (dun) = (yes);
29 let (no-of-parts) = (count);
30 let (parts-this-pass) = (no-of-parts);
31 while (parts-this-pass) > 0
32 perform 100-bubble-sort;