Perform and Search



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Perform and Search

Postby rambachi2000 » Sat Jul 23, 2011 9:07 pm

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.
rambachi2000
 
Posts: 9
Joined: Fri Mar 18, 2011 11:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Perform and Search

 

Re: Perform and Search

Postby Robert Sample » Sat Jul 23, 2011 9:26 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Perform and Search

Postby dick scherrer » Sat Jul 23, 2011 9:58 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post