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
 

 

To check whether this field contains only zeroes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
renjithravi

New User


Joined: 28 Jul 2008
Posts: 14
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

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, 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: 14
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

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

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
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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am


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