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


Please Help Members By Posting Answers For Below Questions

How do you reference the fixed block file formats from cobol programs

692


how to refer the data field?

1793


What is the default value(s) for an initialize and what keyword allows for an override of the default?

686


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...)

1915


What are the various section in data division and briefly explain them.

683






Which Search verb is equivalent to PERFORM…VARYING?

677


What are the rules of the move verb?

695


State the various causes of s0c1, s0c5 and s0c7.

656


what is the difference between COBOL2 AND COBOL390?

2441


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

812


Why occurs cannot be used in 01 level in COBOL?

707


What are the pertinent COBOL

2035


For rewrite, why is it mandatory that file needs to be opened?

616


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

846


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.

1691