Hello all!
I read in the Natural-Documentation (“View Definition”), it should be possible to use a variable for array-definition inside the define-data-clause. But it doesn’t work with multiple fields of periodic groups. I took the file “SAG-TOURS-G-REISE” as an example out of the ADABAS-Tutorial. (In reality, I got * a “real” file).
My questions:
- Why do a get a NAT0280 in the line I’ve marked in the source code?
- If I change the line containing the periodic group to “02 mitsegler (20)” the program is compile-able. But then I get a runtime error NAT1316. Why?
define data local
*
01 #index1 (N03) init <20>
01 #index2 (N03) init <20>
*
01 reise view of sag-tours-g-reise
02 reise-id /* (N8)
02 c*mitsegler
02 mitsegler (#index1) /* periodic group
03 anrede-name /* (A30)
03 c*sprachen
03 sprachen (#index2) /* (A3)
*
01 #i (N3)
01 #j (N3)
01 #i_max (N3)
01 #j_max (N3)
*
end-define
*
read reise
if reise.C*mitsegler > 0
if reise.C*mitsegler > #index1
write 'C*mitsegler > #index1' reise.reise-id
#i_max := #index1
else
#i_max := reise.C*mitsegler
end-if
for #i = 1 to #i_max
if reise.C*sprachen(#i) > #index2 /* here I get the NAT0280
write 'C*sprachen(' #i ') > #index2' reise.reise-id
#j_max := #index2
else
#j_max := reise.C*sprachen(#i)
end-if
for #j = 1 to #j_max
display
reise-id
reise.C*mitsegler
reise.C*sprachen(#i)
#i
#j
reise.sprachen(#i,#j) /* here I get the NAT1316
end-for
end-for
end-if
end-read
*
end
Kind regards,
Matthias