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 is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What guidelines should be followed to write a structured cobol prgm?
What is difference between static and dynamic call in cobol?
What are different data types in cobol?
What is length is cobol?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What is the local-storage section?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How do you define a variable of comp-1 and comp-2?
how do you reference the esds vsam file formats from cobol programs
what is amode(24), amode(31), rmode(24) and rmode(any)?
What is the difference between comp and comp-3?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What is the utilization of copybook in cobol? Could we utilize a similar copybook?