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 ?

Answers were Sorted based on User's Feedback



What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a pro..

Answer / anoop

Nothing will happen. Program will run fine since Go back
gives the control back to the operating system

Is This Answer Correct ?    18 Yes 2 No

What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a pro..

Answer / 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

What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a pro..

Answer / sivakumar sekharannair

Yes nothing will happen since go back will take the control
back from where it is called and finally the control will
go to operating system

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More COBOL Interview Questions

if i am reading a file with some 50000 records and moving to a DB2 table and suddenly the program abends in between, is there anyway i could restart from the exact record at which the job failed once the program restarts.

2 Answers   UST,


If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value

3 Answers   CTS,


What is the mode in which you will OPEN a file for writing?

4 Answers  


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

0 Answers  


what is the minimum number of lines a Cobol program should have to successfully compile and run

11 Answers   ABC, Societe Generale,






Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb

1 Answers  


what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?

3 Answers   TCS,


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


What is the difference between performing a SECTION and a PARAGRAPH?

5 Answers   Accenture, Patni,


study the data discriptions and answer the questions given below i)01 ORDER RECORD 05 OUT-HEADER PIC X(50) 05 ITEM-COUNT PIC 99 05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT ii)01 NAME-AND-ADDRESS 05 N-AND-A-LINE OCCURES 5 05 LINE-LENGTH PIC P9 05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH iii)01 SALES-LIST 05 SALESMAN-COUNT PIC 99 05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON SALESMAN-COUNT iv)01 ORDER-RECORD 05 NO-OF-BRANDS PIC 99 05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS which of the following is true? a.i) and iii) are valid b.i) and iv) are valid c.i) and iii) are not valid d.all are valid

4 Answers   TCS,


what is Reentrancy and Quasi-reentrancy?

1 Answers  


There are two flat files one having 10 records and other having 5 records. write a cobol pgm to find the duplicate records(matching records)from both files.

1 Answers   Mind Tree,


Categories