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

Difference between GOBACK and RETURN?


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

New User


Joined: 13 Jul 2006
Posts: 11

PostPosted: Fri Jul 28, 2006 12:30 pm
Reply with quote

Hi,
In subroutine, what is the difference of usage in GOBACK and RETURN?
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Jul 28, 2006 12:52 pm
Reply with quote

Hi Vijay,

This topic has been discussed many a time in the forum.
Please search the forum before you post.

Anyhow,

In the case of a Subroutine,

If a GOBACK is coded at the end of the routine. the control goes back to the Called program.
If a Stop Run is coded, the execution terminates and the control goes back to the MVS.

~Vamsi
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Fri Jul 28, 2006 1:01 pm
Reply with quote

For information abt RETURN, please follow

ibmmainframes.com/viewtopic.php?t=1096&highlight=returncode
Back to top
View user's profile Send private message
asvijay

New User


Joined: 13 Jul 2006
Posts: 11

PostPosted: Fri Jul 28, 2006 1:15 pm
Reply with quote

Hi Vamsi,
I did not ask the difference between GOBACK and STOP RUN i just asked diff bn GO BACK and RETURN...i heard the RETURN is also the word can be used to get back the control of subroutine for main program..
Can u help me?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jul 28, 2006 7:06 pm
Reply with quote

The 'RETURN' statement is not the same as the 'GOBACK' statement.

Please read the RETURN STATEMENT from the IBM COBOL Manual

If you still have confusion, please come back

Dave
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Timestamp difference and its average ... DB2 11
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
Search our Forums:

Back to Top