wht is the difference between goto and perform stmts
Answers were Sorted based on User's Feedback
Answer / venu
in go to the control will be transferred to either forward
or backward.once u pick to forward it wont come backward.
only single iteration will be done in go to.
in perform the control transferred to both backward n
forwars also, here multiple iterations will be done.
| Is This Answer Correct ? | 41 Yes | 5 No |
Answer / tata
perform is transfer control to a particular para and after
execution of that para contol comeback to the next statement
of perform.....
goto is also transfer control to a particular para and after
execution of that para contol goes forward... control never
comeback to next statement of goto......
| Is This Answer Correct ? | 24 Yes | 1 No |
Answer / makar
First, what are they use for?
1) 'Go to' statement is use when you want to perform a para
or skip some para's(Somtimes tag are used instead of para)
and jump to next para or tag, without the control comming
back to statement after go to. It is like a Jump.
2) 'Perform' is used when you what to want to perform a
para and want the control to comeback to called statement.
However if you do not use EXIT statement at the end of the
para, it will 'fall thru' and perform the next para. Always
use Perform.. thru and Exit statement if you want the
control to come back.
| Is This Answer Correct ? | 25 Yes | 3 No |
Answer / ravi
we can have control over perform but in goto we can not
have control.
| Is This Answer Correct ? | 14 Yes | 4 No |
Answer / praveen b
Even though i read 6 answers still have a small confusion
regarding goto.
It will be more clear if someone can explain the difference
through a piece of code.
Thanks in Advance.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / jinna
Goto is unconditionally transferring the control elsewhere in the program but Perform is after execution the control return to statement
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / lu
goto is different than perform...goto only don't give you
any execution ...perform execute your stament.....Like
english language...
| Is This Answer Correct ? | 5 Yes | 6 No |
Define static linking and dynamic linking.
When would you use in-line perform?
What is binary search?
What does EXIT do ?
I have sequential file recl 1000 i want to add another 15 bytes to it. The record length should not change..How?
01 x pic s9(8) comp. How will the following value be internally allocated '18787'
How to display the index.(displacement from an array)
given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1
What is the difference between subscript and index?
What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?
What is different between variable length and fixed length?
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 ?