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 |
What is the difference between external and global variables in COBOL?
When can the USING phrase be included in the call statement ?
The maximum number of dimensions that an array can have in COBOL-85 is ?
How to delete leading spaces/blank in COBOL ? Example:- 01 data-name-1 pic x(220) " English is a language". I would like to delete leading spaces.
What is the difference between index and subscript?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
Can printer files (having 133 characters) be of variable length?
) How do u handle errors in BMS macro?
period is missing in the cobol program which error we getting
why occurs clause not mentioned in 01 level
6 Answers HCL, NIIT, TCS, Tesco,
u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?