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 do you come out of an EVALUATE statement?

3 Answers  


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


1.What is the default print format in cobol?

5 Answers   HSBC,


What is SET TO TRUE all about, anyway?

5 Answers  


how to change picture class of copy book variable inside program?

2 Answers  






Please let me know how the Eject verb works for page break.. I want to know the code, how it is used.

3 Answers  


I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?

3 Answers   HCL, IBM,


01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc' if rec1 is moved to rec2 then what is the value of rec2?

5 Answers   Amdocs,


wirte a pgm in using files in which we hav 10 ,20,30 40...100 records in inputfile and i want them to be send to outputfile in reverse order. PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

5 Answers   iGate,


where do we use dyanamic call ? and where do we use static call pls give any example pls ?

3 Answers   Patni,


01 var1 pic s9(9)v99. 01 var2 pic x(30). procedure division. move 12345.99 to var1. move12345.99 to var2. display var1. display var2. what is the output?

2 Answers   IBM,


can we use full outer join with cursors declared in cobol program?

2 Answers  


Categories