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
how to refer the data field?
What is the difference between next sentence and continue in cobol programing language?
Which division and paragraphs are mandatory for a COBOL program?
What do you understand by psb and acb?
Write a program to enter and display the names of students in a class using the occurs clause.
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
What is the use of intialize verb?
Name the divisions, which are available in a cobol program?
What is rmode(any) ?
What are the pertinent COBOL commands?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
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
how do you define single dimensional array and multidimensional array in your cobol?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?