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 / suraj borge
Using evaluate statement
take the value of para in a variable then evaluate it for ex.
evaluate xyz
when 100 perform para-100
when 200 perform para-200
..
.
.
.
.
like that we can replace the goto statement .
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is the difference between a binary search and a sequential search what are the pertinent cobol?
HOw can I get the negative sign while deduct high value from low value
What is a scope terminator give example?
What is the difference between PIC 9.99 and 9v99 in COBOL?
) How do u handle errors in BMS macro?
What are various search techniques in cobol? Explain.
What is the difference between PIC 9.99 and PIC9v99?
In which area will you utilize 88 level items in cobol?
What is the Purpose of Pointer in the string?
What is the difference between binary search and sequential search?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
What the difference is between continue and next sentence?
What are all the divisions of a COBOL program?
A table has two indexes defined. Which one will be used by the SEARCH?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)