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 to refer the data field?

1902


What is the difference between binary search and sequential search?

731


What is the difference between next sentence and continue in cobol programing language?

822


What is amode(31)

807


What are various search techniques in cobol? Explain.

749






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

874


Why did you choose to work with ibm mainframe cobol programming?

730


Name the divisions, which are available in a cobol program?

799


What are all the divisions of a COBOL program?

756


what happens if parmparameter passes zero bytes to the program

1752


Explain about different table spaces.

744


What is report-item in COBOL?

796


What are 77 levels used for?

751


What are the different types of condition in cobol and write their forms.

751


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2008