View previous topic :: View next topic
|
Author |
Message |
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi,
PERFORM VARYING I FROM 1 BY 1 UNTIL I >20 or num(i) equal to zero
IF num (I) =234
Perform AAA.
End-if
End-perform
in the above perform i am checking ' num(i) equal to zero' will it work
My requirement is I want check the occurance of num varaible equal to zero then come out of perform |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It will probably if you re-post your question. . . As posted, this is not clear.
Are "I" and "i" supposed to be the same variable?
If you are incrementing I by one and you leave the routine when it is greater than 20, the test for 234 makes no sense. . .
Ignore this - my brain went on break. . d
What does the array look like? Unless intialized to some non-zero value, all of the "num"s will be zero (or an 0c7 is lilely).
Please post an example that is workable, not just some syntax that might compile.
On the bright side, you can probably do what you want once the definition is clear |
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi, Thanks your for your reply.
I just provided sample code not a actual code from my program
I and i both are same.
'If you are incrementing I by one and you leave the routine when it is greater than 20, the test for 234 makes no sense. . . '
I am checking num(i) =234 not i =234. Please ignore. d
My basic doubt is, in perform shall I check num(I) equal to zero.
since i can check my program only intergration test so before putting this logic i need to confirm with you guys. |
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Thanks
I got the answer... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear you have an answer - thanks for the follow-up
d |
|
Back to top |
|
|
|