Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Will SEARCH ALL terminate after finding the first value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Will SEARCH ALL terminate after finding the first value
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Nov 06, 2006 12:32 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts finding delayed job/s in OPC jzhardy IBM Tools 0 Mon May 29, 2017 9:04 am
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts Finding unreferenced datasets without... Alan Playford JCL & VSAM 5 Tue Jul 12, 2016 9:07 pm
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us