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

Check if a variable has numeric data in REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Sun Apr 18, 2010 8:48 am
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
Reply with quote

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

New User


Joined: 16 Oct 2009
Posts: 13
Location: Bangalore

PostPosted: Mon Apr 19, 2010 3:11 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Running REXX through JOB CLIST & REXX 13
Search our Forums:

Back to Top