01 X 9 VALUE ZERO.
PERFORM VARYING X FROM 1 BY 1 UNTIL X<3
WHAT WILL BE THE OUT PUT OF THIS PROGRAM?
IT IS COMPILING WELL BUT AFTER RUNNING THE LOAD MODULE AND IF I CHECK FOR THE RESULT IN THE SPOOL AREA I COULDNT ABLE TO SEE THE SYSOUT THERE( I HAVE GIVEN THE SYSOUT IN THE JCL). PLEASE HELP ME TO SOLVE THE ISSUE.
Joined: 14 Oct 2005 Posts: 1190 Location: Bangalore,India
U would not be able to see any value since it wont enter in the loop since u made the condition until X<3 So as soon as value of X will be less than 3 it will come out from the loop since syntactically its correct but not logically that s why u r not getting any compiler error . To see the value of X please change the code as below
PERFORM VARYING X FROM 1 BY 1 UNTIL X>3