GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL

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



January 01, 2009 07:31:37 #3
 rs55108   Member Since: January 2009    Total Comments: 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.

     

 

Back To Question