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
 

 

How to check if a variable has numeric data in REXX?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Sun Apr 18, 2010 8:26 am    Post subject: How to check if a variable has numeric data in REXX?
Reply with quote

Hi Guys,

I have done the following in my REXX code

PARSE VAR ASM_OPERANDS DT1 "'" VALUE_I1 "'"

If the variable DT1 has numeric data then I need to continue with my processing. Can any one tell me how to check this?

As we have the ISNUMERIC function in COBOL do we have something like that in REXX?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sun Apr 18, 2010 8:48 am    Post subject: Reply to: How to check if a variable has numeric data in REX
Reply with quote

Use the DATATYPE function.
Back to top
View user's profile Send private message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Sun Apr 18, 2010 1:56 pm    Post subject:
Reply with quote

Thanks a lot for the information.
Back to top
View user's profile Send private message
shibubalakrishnan

New User


Joined: 16 Oct 2009
Posts: 13
Location: Bangalore

PostPosted: Mon Apr 19, 2010 3:11 pm    Post subject:
Reply with quote

Code:

if datatype(user_input,"W") then
 say "Whole number"
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm


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