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
how to access the file from prodution from changeman tool and to submit a file to production
how do you reference the fixed unblock file formats from cobol programs
i want a program using by if, evaluate , string, unstring, perform, occurs?
How you can read the file from bottom?
How do get the result of your program directly on your pc?
) what is the difference between AID and HANDLE AID?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
how can i see junk values in dclgen or in hostvariable of comp ?
What are the different rules for performing sort operation?
how do you reference the variable unblock file formats from cobol programs
How do you define a variable of comp-1 and comp-2?
What rules are followed by the search verb.
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is amode(24)?
How are the next sentence and continue different from each other?