GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL
Go To First  |  Previous Question  |  
 COBOL  |  Question 44 of 44    Print  
What will happen if we give GOBACK instead of STOPRUN in a cobol program which is not called by some other program?

  
Total Answers and Comments: 4 Last Update: July 03, 2009     Asked by: jeeva 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 23, 2006 01:43:26   #1  
chetan        

RE: What will happen if we give GOBACK instead of STOP...
the pgm will go to an infinite loop
 
Is this answer useful? Yes | No
September 01, 2007 05:37:51   #2  
mail_mathewsonyc Member Since: August 2007   Contribution: 10    

RE: What will happen if we give GOBACK instead of STOP...
The program wont go into aninfinite loop!!!
The results are same while using GOBACK or STOP RUN.
Except in the first case if there is a calling program control will pass back.
The programmer can use any of these 2 commands to end pocessing....

 
Is this answer useful? Yes | No
January 31, 2009 07:31:37   #3  
rs55108 Member Since: January 2009   Contribution: 1    

RE: What will happen if we give GOBACK instead of STOPRUN in a cobol program which is not called by some other program?

If GOBACK is coded instead of STOPRUN in a cobol program which is not called by any other program nothing wrong will happen. The program will give desired results.


Generally 3 things are coded to halt the execution of a program they are

STOP RUN
GOBACK
EXIT PROGRAM

STOP RUN is frequently used and mainly coded in main programs(calling program). The control will be returned to OS.

GOBACK is coded in the mainly in the subroutines or called programs. The control will be returned to the calling program. If STOP RUN is coded in the calling program the program will go to an infinite execution. GOBACK can be coded in the programs which is not called by any programs instead of STOP RUN.

EXIT PROGRAM is seldom used.


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
July 03, 2009 07:16:09   #4  
rajkumar5m Member Since: June 2009   Contribution: 1    

RE: What will happen if we give GOBACK instead of STOPRUN in a cobol program which is not called by some other program?
In case of subprogram GOBACK or STOPRUN used to terminate the sub program but when it is used in main progarm it will cause the program to terminate.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape