Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

GOBACK, EXIT PROGRAM and STOP RUN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: GOBACK, EXIT PROGRAM and STOP RUN
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:03 pm    Post subject:
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    Post subject: Re: GOBACK, EXIT PROGRAM and STOP RUN
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    Post subject: difference between GOBACK, EXIT PROGRAM and STOP RUN
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us