77 I PI 9.PERFORM VARYING I FROM 1 BY 1 UNTIL>10DISPLAY 'OK'END-PERFORM.What output/msg is likely when this program is executed thru JCL?

Questions by nirupamkundu

Showing Answers 1 - 6 of 6 Answers

lavanya

  • Jun 2nd, 2006
 

Is it a typo?

until>10....

should be until I > 10

  Was this answer useful?  Yes

nirupam kundu

  • Jun 3rd, 2006
 

77 I PIC 9.
PERFORM VARYING I FROM 1 BY 1 UNTIL I >10
DISPLAY 'OK'
END-PERFORM.

This loop will do into infinite.

  Was this answer useful?  Yes

ATUL BANKE

  • Jun 9th, 2006
 

 this loop will give compilation error becoz value of I is declared for only one digit , when loop reaches to 10 it will find mismatching b/w I & the current value i.e. 10.

  Was this answer useful?  Yes

mark

  • Oct 23rd, 2006
 

this is not an infinite loop.

when the subscript reaches 11 the loop will stop.

  Was this answer useful?  Yes

Abumohammed

  • Nov 10th, 2006
 

Hi

      Surely, It goes to infinite loop.

regards

Abu

  Was this answer useful?  Yes

P.Karthikkumar

  • Jan 17th, 2007
 

Hi,

 I think it may goes to infinite loop, becoz once this loop reaches 11 the value of I is truncated to 1 instead of 11. So again loop starts from begining and it may goes on like this..

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.