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

Search/Search All vs array logic


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

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Fri Feb 22, 2008 6:48 pm
Reply with quote

Hi,

I need to know whether using Search/Search All keyword is in any way inefficient against using array logic linear comparison.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Feb 22, 2008 6:52 pm
Reply with quote

This is such an open-ended question.

Why not set up several good tests that somehow match your processing needs and let us know the results?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Feb 22, 2008 7:21 pm
Reply with quote

nikyojin wrote:
I need to know whether using Search/Search All keyword is in any way inefficient against using array logic linear comparison.
I would think that Search is an 'array logic linear comparison'....
Regarding Search All, I recall someone once said that the break even point was at some number of entries in the table. Above that number, All worked best and below that number, a straight search was best....
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Feb 22, 2008 7:48 pm
Reply with quote

Also if you write your own search logic someone has to maintain it. Since you would be writing in COBOL it would be difficult to write code that would be more efficient then the compiler produces.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 22, 2008 8:11 pm
Reply with quote

IMHO, greater than 128 sorted table-entries would warrant SEARCH ALL usage, which (under the covers), causes a BALR to the associated COBOL run-time routine.

Otherwise, for a straight/sequential SEARCH, the compiler will usually generate in-line code, without issuing a BALR.

HTH....

Regards,

Bill
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Sun Feb 24, 2008 8:51 pm
Reply with quote

Thanks for all ur replies
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 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 first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top