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...


Can we use goto statement in inline_perform ?

Answers were Sorted based on User's Feedback



Can we use goto statement in inline_perform ?..

Answer / sivakumar sekharannair

Yes go to can be used in inline perform. when GO TO is used
in inline perform then irrespective of the number of times
the perform has to execute.. the control will go to GO TO.
example:
PERFORM VARYING A1 FROM 1 BY 1 UNTIL A1 > 4
DISPLAY 'SIVAKUMAR'
GO TO DISPLAY-PARA
END-PERFORM.

DISPLAY-PARA
DISPLAY 'KUMAR'.

SYSOUT:
SIVAKUMAR
KUMAR

Instead of
SIVAKUMAR
SIVAKUMAR
SIVAKUMAR
SIVAKUMAR


Actually the perform has to execute 4 times and so the
display should be executed 4 times. but because GO TO is
given inside the inline perform the control goes to display-
para and and dose not come back.

Is This Answer Correct ?    16 Yes 0 No

Can we use goto statement in inline_perform ?..

Answer / shan

The example used by Sivakumar is perfect,

Perform is used for looping, so it should have a exit
condition. simply perform and end perform wont make wright
syntax.

another kind of perform is

PERFORM <paragraph name> until < conditions>

Is This Answer Correct ?    4 Yes 0 No

Can we use goto statement in inline_perform ?..

Answer / chaitanya

could u please clarify d perform which was specified
PERFORM VARYING A1 FROM 1 BY 1 UNTIL A1 > 4
is inline perform??
I think the format of inline perform is...


perform
...
....
,,,
end perform.

Is This Answer Correct ?    3 Yes 1 No

Can we use goto statement in inline_perform ?..

Answer / rajesh

In-line PERFORMs work as long as there are no internal GO
TOs, not even to an exit.

Is This Answer Correct ?    2 Yes 0 No

Can we use goto statement in inline_perform ?..

Answer / sroul4

The format of inline perform is...


perform
...
....
Go TO para2
display' inline perform'
end perform.

Para2

you can put a GO TO but the control would pass to the go to
label , and it would not display inline perform.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More COBOL Interview Questions

what is a load module ?

3 Answers   TCS,


How many types of sorts are there in cobol?

5 Answers   Cap Gemini,


In an EVALUTE statement is the order of the WHEN clauses significant?

4 Answers  


How many bytes S(8) comp field occupy and its maximum value?

0 Answers  


How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?

3 Answers   Cap Gemini, CTS,


how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it

2 Answers  


How many sections are there in data division?.

10 Answers   Amdocs, TCS,


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


How can you submit a job from COBOL programs?

2 Answers   ITC Infotech,


If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.

3 Answers   CTS,


How to know whether the module is dynamical or statistical?

0 Answers  


Categories