I have problem with %lookup. I would like to search array with my search arg. and IF not %found in array - write to array.
When I do lookup for the first time and array is empty yet, I get decimal data error. When I write sth to array and then do lookup, it works fine.
What could be wrong? Or is there any way to search array?
When I do lookup for the first time and array is empty yet, I get decimal data error. When I write sth to array and then do lookup, it works fine.
What could be wrong? Or is there any way to search array?
Code:
dINVA 11 DIM(9999) d kodkrx 11 0 OVERLAY(INVA:1) d i 4 0 i = 1; setll (3) PLLI51Al1; reade(n) (3) PLLI51Al1; dow not %eof (PLLI51AL1); chain(n) KODKR PLLI51PF; if %found; if %lookup(KODKR : kodkrx) = 0; kodkrx(i) = kodkr; i = i+1; endif; ENDIF; reade(n) (3) PLLI51Al1; enddo;
Comment