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

INSPECT for checking numbers


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Aravind Kumar. S

New User


Joined: 28 Apr 2005
Posts: 26

PostPosted: Wed Jul 06, 2005 11:57 am
Reply with quote

hi,

How to use INSPECT for checking a particular string is having number?

Thanks,
Aravind
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Jul 06, 2005 4:33 pm
Reply with quote

Hi Arvind,

Try this....

Code:
INSPECT WS-XY TALLYING I FOR ALL "0"
                                 "1"
                                 "2"
                                 "3"
                                 "4"
                                 "5"
                                 "6"
                                 "7"
                                 "8"
                                 "9".

IF I > 0
DISPLAY ' NUMBER FOUND'.


Regards,

Priyesh.
Back to top
View user's profile Send private message
Aravind Kumar. S

New User


Joined: 28 Apr 2005
Posts: 26

PostPosted: Wed Jul 06, 2005 5:35 pm
Reply with quote

thanks Priyesh,

But is there anything, to check it in single command like,

inspect string tallying i for all numbers

Thanks,
Aravind.S
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Generate random number from range of ... COBOL Programming 3
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
No new posts Checking the total counts inside a re... JCL & VSAM 5
No new posts Feild level validation to test first ... JCL & VSAM 10
Search our Forums:

Back to Top