IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Will SEARCH ALL terminate after finding the first value


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mull

New User


Joined: 21 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Nov 06, 2006 8:42 am
Reply with quote

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
View user's profile Send private message
premnath.mls

New User


Joined: 16 Aug 2006
Posts: 9

PostPosted: Mon Nov 06, 2006 9:04 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Nov 06, 2006 12:32 pm
Reply with quote

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
View user's profile Send private message
mull

New User


Joined: 21 Sep 2006
Posts: 15
Location: india

PostPosted: Tue Nov 07, 2006 7:27 pm
Reply with quote

Thanks for the help
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top