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
how to refer the data field?
What is the difference between binary search and sequential search?
What is the difference between next sentence and continue in cobol programing language?
What is amode(31)
What are various search techniques in cobol? Explain.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Why did you choose to work with ibm mainframe cobol programming?
Name the divisions, which are available in a cobol program?
What are all the divisions of a COBOL program?
what happens if parmparameter passes zero bytes to the program
Explain about different table spaces.
What is report-item in COBOL?
What are 77 levels used for?
What are the different types of condition in cobol and write their forms.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there