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


PERFORM ACCUMULATE-TOTALS
VARYING A FROM 1 BY 2 UNTIL A >2
AFTER B FROM1 BY 1 UNTIL B>2
AFTER C FROM 2 BY -1 UNTIL C<2
How many times the paragraph ACCUMULATE-TOTALS would be
exicuted?

Answers were Sorted based on User's Feedback



PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B&g..

Answer / shakilaashwin

PERFORM ACCUMULATE-TOTALS
VARYING A FROM 1 BY 2 UNTIL A >2
AFTER B FROM 1 BY 1 UNTIL B>2
AFTER C FROM 2 BY -1 UNTIL C<2.

ACCUMULATE-TOTALS.
ADD 1 TO ACCUMULATE-CNT.
DISPLAY 'A - ' , A.
DISPLAY 'B - ' , B.
DISPLAY 'C - ' , C.


Ans is 2 - The loop will be executed until all the condition
(A > 2, B > 2, C < 2) becomes True.

Execution : 1 Condition is
A - 1 True
B - 1 True
C - 2 False

Execution : 2
A - 1 False
B - 2 True
C - 2 False

When going for 3rd execution - No condition Will be True

Is This Answer Correct ?    6 Yes 2 No

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B&g..

Answer / vel

2 times

Is This Answer Correct ?    2 Yes 0 No

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B&g..

Answer / guy

2 times.But how

Is This Answer Correct ?    1 Yes 0 No

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B&g..

Answer / shan

looping happens for following values of
A, B, C
1, 1, 2 = 1st
1, 2, 2 = 2nd
2, 1, 2 = 3rd
2, 2, 2 = 4th

So totally four times this will get executed

Is This Answer Correct ?    2 Yes 3 No

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B&g..

Answer / shailendra

i think it will work once

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More COBOL Interview Questions

What is rmode(any) ?

0 Answers  


What is normalisation?

2 Answers   IBM,


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

0 Answers  


01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?

3 Answers   Patni,


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


How do we get current date from system with century in COBOL?

0 Answers   Winsol Solutions,


can we use full outer join with cursors declared in cobol program?

2 Answers  


What is the meaning of 'Eject' verb in cobol?

2 Answers   TCS, Wipro,


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

0 Answers  


consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

5 Answers   TCS,


Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.

2 Answers   RBS,


Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.

3 Answers  


Categories