In my program, I have defined a data structure array as follows:
How can I perform a lookup to see in a specific Inv# exists in Arydta.arInv# before taking action. I have not been able to get any variation of %lookup to compile using an array data structure, so I ended up doing it this way by checking each element.
Is there a way to do this using %lookup without re-defining the DS
Code:
[FONT=courier new]D Max C 1000 D Arydta DS Dim(Max) Qualified D arInv# 7p 0 Overlay(AryDta:*next) inz D arDate 6p 0 Overlay(AryDta:*next) inz D arInvAmt 9p 2 Overlay(AryDta:*next) inz D ArMemAmt 9p 2 Overlay(AryDta:*next) inz D ArSfBal 9 2 Overlay(AryDta:*next) inz D ArIapam 9 2 Overlay(AryDta:*next) inz D ArIajam 9 2 Overlay(AryDta:*next) inz D ArHapam Overlay(AryDta:*next) inz D ArHajam Overlay(AryDta:*next) inz D ArSfDesc Overlay(AryDta:*next) inz [/FONT]
Code:
For Ix = 1 to Max ; If Arinvn = AryDta(ix).Arinv#; Found = 'Y'; Leave; Endif; Endfor;




Comment