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
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is the difference between Global and External Variables?
What are the different open modes available in cobol?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
How do u write test cases?
Write the code implementing the perform … varying.
What is a report item?
What are declaratives and what are their uses in cobol?
Can we redefine the field of x(200) to less than 200?
how do you reference the esds vsam file formats from cobol programs
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Name the divisions, which are available in a cobol program?
In COBOL, what is the different between index and subscript?
what is search and searchall?what is the diffrence between them?give an best example?