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
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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