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

how to access the file from prodution from changeman tool and to submit a file to production

1 Answers   IBM,


what is the advantage of sync class

3 Answers   ACS,


why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


Hai friends why we need to read a file before re-write a record?

7 Answers   L&T,


I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

3 Answers   IBM,


can we read records in a file from botom to top. if possible how can we read

12 Answers   ACS,


Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad

35 Answers  


If i initialize the 01 level variable in array, will it initialize all the array elements (occurs)?

8 Answers   CTS,


How many bytes S(8) comp field occupy and its maximum value?

0 Answers  


How is sign stored in a comp-3 field?

7 Answers  


What rules are followed by the search verb.

0 Answers  


What are differences between Static Call and Dynamic Call?

10 Answers   IBM, KBC, Keane India Ltd, Verizon,


Categories