Should I use STOP RUN in the sub program??why?

Answers were Sorted based on User's Feedback



Should I use STOP RUN in the sub program??why?..

Answer / s

Stoprun return the cursor to the OS, subprogram cursor will
be return to the main program that’s way we coded
exitprogram or goback

Is This Answer Correct ?    15 Yes 0 No

Should I use STOP RUN in the sub program??why?..

Answer / veni

If STOP RUN is used in the sub program, execution will
terminate there itself and it will never come to main
program. Thats why we have to use only GOBACK in the sub
programs.

Normally, we will code STOP RUN only in main programs not
in sub programs.

Is This Answer Correct ?    13 Yes 0 No

Should I use STOP RUN in the sub program??why?..

Answer / sharath

we cant use stoprun in sub program bec. if we use stoprun
in sub program control automatically goes to subprogram OS.
here we want Control goes to main program.so we are using
Goback or exit

Is This Answer Correct ?    4 Yes 0 No

Should I use STOP RUN in the sub program??why?..

Answer / guest

no

Is This Answer Correct ?    4 Yes 0 No

Should I use STOP RUN in the sub program??why?..

Answer / suresh ramaiyan

If we use STOP RUN in the sub program, in sub program
itself will terminate the execution and the control will
not come back to the calling program or main program.

Instead we can use "EXIT PROGRAM". This command will pass
the control to main program.

Is This Answer Correct ?    3 Yes 0 No

Should I use STOP RUN in the sub program??why?..

Answer / narasimha reddy.k

If STOP RUN is used in the sub program, execution will
terminate there itself and it will never come to main
program. Thats why we have to use EXIT PROGRAM or GOBACK in
the sub programs.

Normally, we will code STOP RUN only in main programs not
in sub programs.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

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 ?

3 Answers  


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

5 Answers   Accenture, Patni,


what is mainframe? what is the mainframe software ? what is use in s/w field?

7 Answers   CSE,


Explain about Redefines cluse?

3 Answers   iGate,


What is the maximum data length for Numeric DataType ?

3 Answers   Cap Gemini,


study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level

4 Answers   TCS,


If I want to increase the Limit in GDG. What should I do?

2 Answers   IBM,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


Consider the following COBOL entries 05 X PIC 99 VALUE 10. ADD 40 X TO X. COMPUTE X = 3 * X - 40. The result in X is

12 Answers   TCS,


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

0 Answers  


What is 77 level used for ?

12 Answers   IBM, iGate,


WE HAVE 5 DIFFERENT RECORDING MODE IN COBOL.FIXED, FIXEDBLOCK, VARIABLE, VARIABLEBLOCK AND UNDEFINED. WHAT IS THE DIFFERENCE AMONG ALL AND WHICH TYPE OF FORMAT SHOULD BE USED WHEN

3 Answers   Infosys,


Categories