Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us