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
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 |
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 |
Answer / guest
ans # 2 is correct .
Very often I USE go back in stand alone programs .
| Is This Answer Correct ? | 23 Yes | 7 No |
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 |
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 |
Answer / kotilingam
program execution will stop and control will not go back.
| Is This Answer Correct ? | 1 Yes | 9 No |
Answer / mithun
The program execution will go into infinite loop.
| Is This Answer Correct ? | 11 Yes | 58 No |
A s9(4). B v9(4) value 0.21 can i move this?
What is the difference between Structured COBOL Programming and Object Oriented COBOL ?
how can u pass the values into db2 values from cobol ?
The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290
What is the LINKAGE SECTION used in COBOL?
why 02 level number can't be use as a separate level number like 01 or 77 ?
what is meaning by design document? who can repared for this?
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
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?
In COBOL CALL-CALLING,if a program A is calling 3 sub- programs, dynamically, then it is said sub-programs will always will always in Initial Mode. My question is : Do we need to code CANCEL or (IS INITIAL) for dynamically called sub-programs or it is the property of Dynamically called pgms so every time sub-pgms are called they will be in initial mode. ***This question is only Dynamic call****, Please reply. Thank you in advance.
What was removed from COBOL in the COBOL II implementation?
how to display date in reverse order if the pic clause of the is numeric suppose date is 09032010 ==> need to print in 20100309 (pic clause is numeric)