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

What is perform what is varying?

805


How do you reference the fixed block file formats from cobol programs

804


What are literals?

724


How you can read the file from bottom?

749


What is amode(31)

807






What is inspect in cobol ?

881


What is the difference between binary search and sequential search?

731


What are the various section in data division and briefly explain them.

815


Have you used comp and comp-3 in your project? And how?

2087


What is the difference between external and global variables in COBOL?

911


What is a report item?

813


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1219


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1782


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

512


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?

982