How to replace the GOTO statement in COBOL without changing
the structure of program. e.g. consider following code...
I.D.
E.D.
D.D.
P.D.
compute C = A + B.
GOTO para 100-display.
compute D = C - D.
GOTO 200-display.
some other logic......
........
GOTO 300-para.
......
......
GOTO 400-para.
Now I want to replacce all GOTO statements without
changing the structure and otput of program.
Answer Posted / krishnan a
Instead of GOTO we can use PERFORM noneed to go EVALUATE
also
compute C = A + B.
PERFORM 100-display.
compute D = C - D.
PERFORM 200-display.
some other logic......
........
PERFORM 300-para.
......
......
PERFORM 400-para.
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
State the various causes of s0c1, s0c5 and s0c7.
Explain the configuration section of a cobol program with examples of syntax.
how do you define single dimensional array and multidimensional array in your cobol?
In COBOL programming, what is PERFORM? What is VARYING?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
Explain about different table spaces.
Why did you choose to work with ibm mainframe cobol programming?
What kind of error is trapped by on size error option?
What is a report item?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is amode(31)
Explain how to differentiate call by context by comparing it to other calls?
What guidelines should be followed to write a structured cobol prgm?
Explain what you understand by passing by value.