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

can you declare redefine in level 01?

8 Answers   Patni,


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


What is the difference between comp and comp-3?

0 Answers  


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

0 Answers   Steria,


How to execute a set of JCL statements from a COBOL program?

2 Answers   Patni, Syntel,


how to move the records from file to array table. give with code example

0 Answers   ADP, Syntel,


Explain complete concept of table handling in COBOL with an example?

2 Answers   IBM, TCS, Wipro,


write a program to eliminate duplicate records in a input file and send them to output file.

2 Answers   IBM,


What are different data types in cobol?

0 Answers  


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,


How can we pass data from cobol to JCl?

7 Answers   ADP, Amdocs, IBM,


Categories