Page 1 of 1

Perform and Search

PostPosted: Sat Jul 23, 2011 9:07 pm
by rambachi2000
As per my understanding What ever we are doing with SEARCH , the same we can do it through PERFORM also
would like to know what is exact difference between these two statements.

Re: Perform and Search

PostPosted: Sat Jul 23, 2011 9:26 pm
by Robert Sample
SEARCH is used to look for a particular value in a table (or array). PERFORM is used to execute a section or paragraph (or paragraphs) of code. The code that is being PERFORMed can do a table search, but it also can do other things, such as read and / or write files.

Re: Perform and Search

PostPosted: Sat Jul 23, 2011 9:58 pm
by dick scherrer
Hello,

As per my understanding What ever we are doing with SEARCH, the same we can do it through PERFORM alsowould like to know what is exact difference between these two statements.

Ah, um, well - not really. The exact difference is that they have almost nothing to do with each other. . .

Suggest you find the COBOL Language Reference for your version/release of the compiler and thoroughly read about these. There is actually very little similarity. If you find something in the documentation that is not clear, post what you found and your doubt. Someone here should be able to clarify.