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
What guidelines should be followed to write a structured cobol prgm?
In which area will you utilize 88 level items in cobol?
Explain how you can characterize tables in cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What are the pertinent COBOL
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
how to access the file from prodution from changeman tool and to submit a file to production
Have you used comp and comp-3 in your project? And how?
What is the difference between comp and comp-3?
What are all the divisions of a COBOL program?
how to move the records from file to array table. give with code example
how to convert the recors form vsam file to db2 table tru file aid
how to refer the data field?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?