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

how to access the file from prodution from changeman tool and to submit a file to production

6686


how do you reference the fixed unblock file formats from cobol programs

712


i want a program using by if, evaluate , string, unstring, perform, occurs?

4065


How you can read the file from bottom?

660


How do get the result of your program directly on your pc?

1885






) what is the difference between AID and HANDLE AID?

1637


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1846


how can i see junk values in dclgen or in hostvariable of comp ?

2546


What are the different rules for performing sort operation?

763


how do you reference the variable unblock file formats from cobol programs

751


How do you define a variable of comp-1 and comp-2?

707


What rules are followed by the search verb.

638


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

710


What is amode(24)?

684


How are the next sentence and continue different from each other?

766