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 / krishnan a

Instead of GOTO we can use PERFORM noneed to go EVALUATE
also
compute C = A + B.
PERFORM 100-display.
compute D = C - D.
PERFORM 200-display.
some other logic......
........
PERFORM 300-para.
......
......
PERFORM 400-para.

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What guidelines should be followed to write a structured cobol prgm?

659


In which area will you utilize 88 level items in cobol?

704


Explain how you can characterize tables in cobol?

633


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

639


What are the pertinent COBOL

2034






How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2712


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2048


how to access the file from prodution from changeman tool and to submit a file to production

6660


Have you used comp and comp-3 in your project? And how?

2002


What is the difference between comp and comp-3?

688


What are all the divisions of a COBOL program?

656


how to move the records from file to array table. give with code example

2207


how to convert the recors form vsam file to db2 table tru file aid

2745


how to refer the data field?

1793


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

695