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
Difference between cobol and cobol-ii?
what are decleratives in cobol?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
) how do u code after getting data?
Write down the divisions of cobol program?
How are the next sentence and continue different from each other?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
how do you reference the variable unblock file formats from cobol programs
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
What is a scope terminator give example?
Write a program to enter and display the names of students in a class using the occurs clause.
Mention the guidelines to write a structured cobol program?
What guidelines should be followed to write a structured cobol prgm?
How many sections are there in data division in COBOL?