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


Please Help Members By Posting Answers For Below Questions

Difference between cobol and cobol-ii?

704


) How do u handle errors in BMS macro?

1427


What is amode(24)?

682


How you can characterize tables in cobol?

713


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

747






how to convert the recors form vsam file to db2 table tru file aid

2761


What are the different rules to perform a Search?

613


How can you get the ksds file records into your cobol program?

640


Define static linking and dynamic linking.

661


How do you reference the fixed block file formats from cobol programs

703


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1842


What are the rules of the move verb?

704


Define cobol?

857


IF I mention stop run in CICS what happens?

1894


What are the different data types in cobol?

788