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

Write a program to explain size error.

0 Answers  


What is different between variable length and fixed length?

2 Answers   TCS,


How to use the same cobol program in Batch and CICS onlines ? Please expalin with an example. Thanks in advance.

1 Answers  


I have two files , file1 is input file it contains 10,20,30,....,records but i want to display the records in file 2 as reverse order .how can we do by using jcl& cobol(dont use array) please any one can tell me the answer

3 Answers   GreenTree, IBM,


level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


plz,could any one tell me? what about EBCDIC in cobol?briefly?

1 Answers  


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

0 Answers   HeadStrong,


what is the advantage of sync class

3 Answers   ACS,


what is internal sort and external sort ? which is preferable ?

2 Answers   TCS,


Why do we use COMP-3 variables for computation, when we know that they are non displayable fields and require additional MOVE to numeric field before we populate it in output Reports?

1 Answers   Accenture,


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?

2 Answers   HCL,


Categories