IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GOBACK, EXIT PROGRAM and STOP RUN


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aprak00
Warnings : 2

New User


Joined: 09 Aug 2006
Posts: 24

PostPosted: Mon Sep 11, 2006 2:24 pm
Reply with quote

please explain the difference between GOBACK, EXIT PROGRAM and STOP RUN?
Back to top
View user's profile Send private message
inr

New User


Joined: 08 Sep 2006
Posts: 1
Location: india

PostPosted: Mon Sep 11, 2006 2:34 pm
Reply with quote

Exit : the control comes out of the program.
go back: the control goes to the OS
stop run:it indicates the end of the paragraph.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:03 pm
Reply with quote

Hi,

There is no difference in the function of STOP RUN or GOBACk if in a STANDALONE program. As soon the program executes, the control goes back to MVS.

But in case of Called program,

If Stop Run, the Control goes back to MVS which shouldn't be the case. where as for GoBack, the control goes to the Calling Program.
For the reason, we shouldn't code Stop Run for a Subroutine.
Back to top
View user's profile Send private message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Wed Sep 13, 2006 11:13 am
Reply with quote

Stop Run : Is coded only in the main program and it returns the control back to the operating system.

GO back: Can be coded in main program and sub program and it returns teh control from where it received the control

Exit Program:Is coded in sub program and it returns the control to the main program.
Back to top
View user's profile Send private message
pankajupadhyay
Warnings : 1

New User


Joined: 04 May 2007
Posts: 13
Location: pune

PostPosted: Sun May 06, 2007 8:58 pm
Reply with quote

STOP RUN is the last executable statement of main program that give the control back to MVS/os.
EXIT is last executable statement of sub program that control back to main program.
GOBACK is not executable but last statement of any program which give the control back to "where it came"
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Use of Perform Thru Exit COBOL Programming 6
Search our Forums:

Back to Top