simple-compound.p
1 |
define temp-table tt1 field f1 as integer index idx1 f1. |
---|---|
2 |
define temp-table tt2 field f2 as integer index idx2 f2. |
3 |
|
4 |
create tt1. tt1.f1 = 1. |
5 |
create tt1. tt1.f1 = 2. |
6 |
create tt1. tt1.f1 = 3. |
7 |
|
8 |
create tt2. tt2.f2 = 1. |
9 |
create tt2. tt2.f2 = 2. |
10 |
create tt2. tt2.f2 = 3. |
11 |
|
12 |
def query q for tt1, tt2 scrolling. |
13 |
open query q for each tt1, each tt2. |
14 |
|
15 |
def var cnt as integer. |
16 |
repeat: |
17 |
cnt = cnt + 1. |
18 |
query q:get-next(). |
19 |
|
20 |
if cnt = 5 then do: |
21 |
create tt1. tt1.f1 = 5. |
22 |
create tt2. tt2.f2 = 7. |
23 |
leave. |
24 |
end. |
25 |
end. |
26 |
|
27 |
def frame fr |
28 |
tt1.f1 tt2.f2 |
29 |
with 20 down. |
30 |
query q:get-first(). |
31 |
repeat: |
32 |
if not avail(tt1) then leave. |
33 |
|
34 |
display tt1.f1 tt2.f2 with frame fr. |
35 |
query q:get-next(). |
36 |
end. |