What will happen if you code GO BACK instead of STOP RUN in
a stand alone COBOL 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 ?..

Answer / tidda

For a standalone program, it is the same. But STOP RUN from
a called program will not return control to the calling
program.

Is This Answer Correct ?    62 Yes 1 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / nilesh

Goback will return control back to OS ie its logical ending
of program but OS will decide what to do next , but
fortunately as GOBACK is the last statement in program so
it terminates.
GOBACK is specially used for called progam but we can use
it in main(STAND ALONE) program also.

Is This Answer Correct ?    49 Yes 0 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / guest

ans # 2 is correct .
Very often I USE go back in stand alone programs .

Is This Answer Correct ?    23 Yes 7 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / shan

Answer 4 is the correct explanation...

Is This Answer Correct ?    13 Yes 1 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

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 ?    14 Yes 3 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / shilpi gupta

When Go back is specified in main program, it will act like STOP RUN and will give control back to MVS/OS.

Is This Answer Correct ?    0 Yes 0 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / kotilingam

program execution will stop and control will not go back.

Is This Answer Correct ?    1 Yes 9 No

What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?..

Answer / mithun

The program execution will go into infinite loop.

Is This Answer Correct ?    11 Yes 58 No

Post New Answer

More COBOL Interview Questions

How to read a 100 record from a file through cobol?

2 Answers  


how many divisions are there in cobol

3 Answers   ADP,


How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)

3 Answers   IBM,


We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the middle of the program B control wants to go program C,after completion of program C again control comes to program B and again after completion of program B control comes to program A.How the process will takes and what are the controls we use for that process.If it is possible anybody of you explain with example?

5 Answers   IBM,


tell me about examine inspect and evaluate ?

2 Answers   CTS,






How can you add a particular field/coloumn in copybook?

3 Answers   ADP, DELL, L&T,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  


What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   IBM, RBS,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


01 a pic 9(6) value is 123456 01 b pic 9(3) move a to b wht will be the value ?

6 Answers   Patni,


Without using move verb how to move one variable to another.

5 Answers  


How do u write test cases?

0 Answers   IBM,


Categories