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 / muttaiah

My Opinion is we won't be able to change GOTO with Perform
here. why because if we use perform instead of goto like
this..
compute C = A + B.
Perform para 100-display.
compute D = C - D.
Perform 200-display.

what will happen means once c value is calculated. It wil
execute 100-display para once it completes. It will
calcualte d value. which is not the case in goto. Once C
value is calculated the control is passed to 100-display
para. The control will never return and cal D value.
what say!!
Correct me if i'm wrong please

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to differentiate call by context by comparing it to other calls?

695


What is the LINKAGE SECTION used in COBOL?

900


What is the difference between external and global variables in COBOL?

823


What are the different rules for performing sort operation?

770


How do you differentiate between cobol and cobol-ii?

662






How do we get current date from system with century in COBOL?

815


What is the Purpose of Pointer in the string?

651


What is the problem of ordered sequential files access?

708


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

691


For rewrite, why is it mandatory that file needs to be opened?

627


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

656


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

863


What is a scope terminator give example?

661


What are different data types in cobol?

701


What is amode(24)?

686