Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Perform Condtion check

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Perform Condtion check
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

Site Director


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

PostPosted: Fri Sep 05, 2008 4:13 am    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Thanks

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

Site Director


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

PostPosted: Fri Sep 05, 2008 4:56 am    Post subject: Reply to: Perform Condtion check
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Syntax to check the first 4 digits of... kshirabdhi DFSORT/ICETOOL 10 Tue May 03, 2016 12:21 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us