What is the difference between SEARCH and SEARCH ALL? What
is more efficient?
Answer Posted / kumar raja.
SEARCH ALL is an efficient one then why we need SEARCH ?
ONE EXAMPLE.
In VSAM files by passing the partial key we can search the
record using SEARCH or AEARCH ALL
But if you would like to point out 1st record with this
partial key, SEARCH will find the 1st record with that
partial key.
And SEARCH ALL will not. (95%)
Example. (Here my target to get 1st record with the
partial key. i.e (200 300 XXXXXXA)
VSAM File. (assume KEY as : ORG LOGO ACCOUNT) and
partial KEY (ORG = 200 LOGO = 300)
ORG LOGO ACCOUNT
100 222 XXXXXXXXX
100 333 XXXXX
111 333 XXXXXXX
200 300 XXXXXXA
200 300 XXXXXXB
200 300 XXXXC
200 300 XXXXXXD
250 300 XXXXXXX
300 340 XXXXXXX
In the case of search the O/P will be (200 300 XXXXXA)
Correct as per the requirement.
But in case of SEARCH ALL the response will be (200 300
XXXXXB). Wrong as per the requirement.
Regards,
Kumar Raja.
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is the local-storage section?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
Mention the guidelines to write a structured cobol program?
How do you define a variable of comp-1 and comp-2?
How do you reference the following file formats from cobol programs?
What is perform what is varying?
what is search and searchall?what is the diffrence between them?give an best example?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
Why did you choose to work with ibm mainframe cobol programming?
Difference between cobol and cobol-ii?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is the difference between comp and comp-3 usage?
What is a scope terminator give example?