Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
To check whether this field contains only zeroes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
renjithravi

New User


Joined: 28 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Tue Jul 29, 2008 11:01 am    Post subject: To check whether this field contains only zeroes
Reply with quote

Hi,

I have a field declared as char(25). But it will will be filled with only numbers from 0 to 9. I want to check whether this field contains only zeroes and do some procesing. How to do this check?

Thanks and regards
Renjith
Back to top
View user's profile Send private message
References
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1148
Location: Mumbai - India

PostPosted: Tue Jul 29, 2008 11:23 am    Post subject: Reply to: TO CHECK WHTHER A FIELD CONTAINS ZEROES
Reply with quote

renjith,

Quote:
I have a field declared as char(25). But it will will be filled with only numbers from 0 to 9.


Will all the 25 bytes be filled with numerals? If yes, you can first use IS NUMERIC and then check the field for zeroes and process accordingly.
Back to top
View user's profile Send private message
renjithravi

New User


Joined: 28 Jul 2008
Posts: 6
Location: Chennai

PostPosted: Tue Jul 29, 2008 11:27 am    Post subject:
Reply with quote

yes all the 25 bytes will be filled with numerals..i can check whether the field is numeric but how to check for zeros?
should i have to hardcode IF A = 25ZEROES or u have any other option like
IF A IS ZEROES?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1639
Location: germany

PostPosted: Tue Jul 29, 2008 1:10 pm    Post subject: Reply to: To check whether this field contains only zeroes
Reply with quote

IF A = ALL '0'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1