Page 1 of 1

why we are not using multiple when conditions in search all

PostPosted: Wed Oct 31, 2012 9:16 am
by slaxman9
Any one help me for this ....

Why we are not using multiple when conditions in searchall...

Re: why we are not using multiple when conditions in search

PostPosted: Wed Oct 31, 2012 11:47 am
by Pandora-Box
multiple when conditions


What do you mean by that?

Re: why we are not using multiple when conditions in search

PostPosted: Wed Oct 31, 2012 12:01 pm
by Monitor
Its difficult to understand your question.
Search All (Binary Search) can only specify one condition related to the key, and nothing but the key. Thats the idea with binary search.
If you want to specify "multiple" conditions, you can use sequential Search (remove the All keyword).

Re: why we are not using multiple when conditions in search

PostPosted: Wed Oct 31, 2012 2:47 pm
by BillyBoyo
SEARCH ALL will discover whether an item exists in the table, or it does not. Since there are only two possible outcomes, which are mutually exclusive, and can already be identified as seperate, there is no opportunity for multiple condition statements.

Re: why we are not using multiple when conditions in search

PostPosted: Wed Oct 31, 2012 5:44 pm
by Robert Sample
There is a link to IBM Manuals at the top of the page. If you click on it, then click on the Enterprise COBOL Language Reference manual, you can find the syntax diagram for the SEARCH ALL statement in section 6.2.32 and it explicitly allows a WHEN condition to use AND, so even though you can only use one WHEN statement that statement can be a compound condition.

Re: why we are not using multiple when conditions in search

PostPosted: Wed Oct 31, 2012 9:56 pm
by slaxman9
Thanks to all....