What will happen if you code GO BACK instead of STOP RUN in
a stand-alone COBOL program i.e. a program which is not
calling any other program ?

Answer Posted / vampire

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 Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1948


What are the different types of condition in cobol and write their forms.

651


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

704


how to access the file from prodution from changeman tool and to submit a file to production

6666


What is report-item in COBOL?

702






How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3710


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

639


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

408


What are 77 levels used for?

652


what happens if parmparameter passes zero bytes to the program

1653


In COBOL, what is the different between index and subscript?

751


What is the difference between goback, stop run and exit program in cobol?

914


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

886


Explain how to differentiate call by context by comparing it to other calls?

679


Name the divisions, which are available in a cobol program?

677