Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

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

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

Answer / nag(igate)

using evaluate statement

Is This Answer Correct ?    8 Yes 1 No

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

Answer / suraj borge

Using evaluate statement
take the value of para in a variable then evaluate it for ex.
evaluate xyz
when 100 perform para-100
when 200 perform para-200
..
.
.
.
.
like that we can replace the goto statement .

Is This Answer Correct ?    8 Yes 2 No

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

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

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

Answer / vani

is there any exit statement for the goto para
if it's so,it can be replaced with perform statement

Is This Answer Correct ?    3 Yes 0 No

How to replace the GOTO statement in COBOL without changing the structure of program. e.g. conside..

Answer / ganesh

but if there is no any condition to check for in evaluate
statement. how can we replace it using evaluate.

won't it change the structure of program if we use evaluate
statement.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

i have the job which has written updated 100 records into the table and for 101th record it got abended and i want to start the job again and should wirte from 101th record not from 1st record..how to do it..?

6 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  


2)Where the Plan is located in CICS-DB2?

1 Answers   IBM,


What is rmode(24)

0 Answers  


wht is packed decimal in cobol

2 Answers  


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

0 Answers  


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks

1 Answers  


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

7 Answers   T systems,


What is the utilization of copybook in cobol?

0 Answers  


Explain call by context by comparing it to other calls.

1 Answers  


What is a SSRANGE and NOSSRANGE?

0 Answers  


Categories