View previous topic :: View next topic
|
Author |
Message |
mull
New User
Joined: 21 Sep 2006 Posts: 15 Location: india
|
|
|
|
Hi All,
If i am searching a table with a Search All for on a field agent _no and there are two occurences of the value will search all terminate after finding the first value?
If i want to fetch the second value also what should i do. |
|
Back to top |
|
|
premnath.mls
New User
Joined: 16 Aug 2006 Posts: 9
|
|
|
|
haI..
you can include the ssearch all atatement within the perform statement...by this allow ,your search to the all occurences.
i hope you got the point ..
if you need a logic, bring back to me... |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Code: |
05 WS-TABLE OCCURS 1 TO 100 TIMES
ASCENDING KEY IS AGENT-NO
INDEXED BY TABLE-IDX.
10 AGENT-NO PIC X(10).
PERFORM TABLE UNTIL COUNT >= 2
SEARCH ALL
WHEN AGENT-NO(TABLE-INDX) = STRING
ADD 1 TO COUNT
END-SEARCH
SET TABLE-IDX UP BY 1
END-PERFORM. |
Hope this will helpful. |
|
Back to top |
|
|
mull
New User
Joined: 21 Sep 2006 Posts: 15 Location: india
|
|
|
|
Thanks for the help |
|
Back to top |
|
|
|