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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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