77 I PIC 9. PERFORM VARYING I FROM 1 BY 1 UNTIL I >10 DISPLAY 'OK' END-PERFORM.
This loop will do into infinite.
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.
mark
Oct 23rd, 2006
this is not an infinite loop.
when the subscript reaches 11 the loop will stop.
Abumohammed
Nov 10th, 2006
Hi
Surely, It goes to infinite loop.
regards
Abu
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..
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?
Profile Answers by nirupamkundu Questions by nirupamkundu
Questions by nirupamkundu