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 do you reference the fixed block file formats from cobol programs
how to refer the data field?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
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 are the various section in data division and briefly explain them.
Which Search verb is equivalent to PERFORM…VARYING?
What are the rules of the move verb?
State the various causes of s0c1, s0c5 and s0c7.
what is the difference between COBOL2 AND COBOL390?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Why occurs cannot be used in 01 level in COBOL?
What are the pertinent COBOL
For rewrite, why is it mandatory that file needs to be opened?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.