IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Perform Condtion check


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Fri Sep 05, 2008 3:40 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 05, 2008 4:13 am
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Fri Sep 05, 2008 4:29 am
Reply with quote

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
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Fri Sep 05, 2008 4:47 am
Reply with quote

Thanks

I got the answer...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 05, 2008 4:56 am
Reply with quote

Good to hear you have an answer - thanks for the follow-up icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Use of Perform Thru Exit COBOL Programming 6
No new posts How to check whether who renamed the ... JCL & VSAM 3
No new posts No ++JCLIN, APPLY CHECK job JCL & VSAM 1
Search our Forums:

Back to Top