What is the difference between STOP and STOP RUN?



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

What is the difference between STOP and STOP RUN?

Postby ramesh4mainframes » Thu Jun 24, 2010 2:35 pm

Hi,

As a fresher i know STOP RUN. That will terminates the entire program. If there is no STOP RUN we will get U4038 (User Abend).But i don't know whether STOP is avaiilable or not?
Thanks,
RamS
ramesh4mainframes
 
Posts: 32
Joined: Mon Jun 07, 2010 3:58 pm
Location: Hyderabad
Has thanked: 0 time
Been thanked: 0 time

Re: What is the difference between STOP and STOP RUN?

Postby Robert Sample » Thu Jun 24, 2010 5:02 pm

http://www-01.ibm.com/software/awdtools ... s/library/ is the COBOL library -- bookmark it for future reference.

The STOP statement can be either STOP RUN or STOP <literal> -- if the latter case, execution is suspended while the literal is displayed upon the console and the operator must reply to the message. Production shops do not usually approve of doing this since the operator message may be lost in the console clutter of normal messages.

You can also use EXIT PROGRAM or GOBACK.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: What is the difference between STOP and STOP RUN?

Postby Anuj Dhawan » Thu Jun 24, 2010 9:13 pm

Also, most of the time (I can safely say, always) GOBACK is preferred though.
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post