MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Really simple rexx tool

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Mon Jan 06, 2003 7:39 am    Post subject: Really simple rexx tool Reply with quote

The rexx called rexi (rexx interpreter)

Code:

/* Rexx rexi rexx command-interpreter */
arg cmdline                             
interpret say cmdline                   
exit                                   

And here are examples of its use:
Example:           Result:                                     
REXI 100*9%5+32       212          Change C  (100) to F  (212)
REXI (212-32)*5%9     100          Change F  (212) to C  (100)
REXI 555+666          1221                                         
REXI c2d('81'x)       129          Character to Decimal           
                                   'nnnn'x = Hexadecimal           
REXI c2x('72s')       'F7F2A2'     Character to Hexadecimal       
REXI c2x('0123'x)     '0123'       Character to Hexadecimal       
REXI date(b)//7       0 - 6        0 Monday, 6 Sunday             
REXI date(d)          130          Days so far this year           
REXI date(e)          dd/mm/yy     European date                   
REXI date(j)          yyddd        Julian date                     
REXI date(m)          January      Month                           
REXI date(n) default  dd mon yyyy  Normal                         
REXI date(o)          yy/mm/dd     Ordered (suitable for sorting) 
REXI date(s)          yyyymmdd     Sorted  (suitable for sorting)
REXI date(u)          mm/dd/yy     USA                           
REXI date(w)          Tuesday      Weekday                       
REXI d2c(129)         '81'x        Decimal to Character         
REXI d2x(129)         '81'         Decimal to Hexadecimal       
REXI time(e)          ssssss.uuuu  Elapsed                       
REXI time(h)          hh           Hours                         
REXI time(l)          hh.mm.ss.uuu Long                         
REXI time(m)          mmmm         Minutes since midnight       
REXI time(s)          sssss        Minutes since midnight       
REXI x2c('F')         '0F'x        Hexadecimal to Character     
REXI x2d('0F')        15           Hexadecimal to Decimal       
                                                                 
REXI d2x(x2d(100a)+x2d(2002)       300c   Hexadecimal Addition
Back to top
View user's profile Send private message Visit poster's website
sudhtech
Beginner


Joined: 27 Mar 2003
Posts: 6
Topics: 2
Location: Chennai

PostPosted: Thu Mar 27, 2003 9:32 am    Post subject: Reply with quote

Hi,

Can you please let me know how to run these commands ?

Thanks!
_________________
Sudheer Nelluri
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Thu Mar 27, 2003 11:38 pm    Post subject: Reply with quote

wow, I don't mind saying that this is sort of a magic routine. What does this interpret actually do?. And how come it can perform so many functions?

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Fri Mar 28, 2003 2:12 am    Post subject: Reply with quote

Sure took you guys a long time to discover this!
Sudhtech, store the Rexi procedure in a library where you can run rexx with. Then just type in rexi and the function you want to use.

Manas Biswal, the interpret just lets you use the input as a command. The interpret is often used to construct a rexx command that has variables as part of the command. Take a look at the manuals on it.
Back to top
View user's profile Send private message Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Fri Mar 28, 2003 2:20 am    Post subject: Reply with quote

There are many languages where you give variable commands (using some Macros) but they get resolved during compilation. But with REXX (and CLIST) you can even vary commands at run time.

Is it because these are interpreter languages?!

Diba.
Back to top
View user's profile Send private message Send e-mail
jacky_ying
Beginner


Joined: 25 Jul 2004
Posts: 46
Topics: 20

PostPosted: Mon Aug 23, 2004 8:22 am    Post subject: Reply with quote

useful and interesting tool,thanks
Back to top
View user's profile Send private message
PRABHAKARP
Beginner


Joined: 27 Aug 2004
Posts: 1
Topics: 0
Location: india

PostPosted: Fri Aug 27, 2004 1:02 am    Post subject: Reply with quote

Hi warp5,

How the above rexi macro will execute.I am trying to execut the rexi commands ,but it says invalid command.plz let me know how to exexute?
_________________
Thanks,

Prabhakar
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Aug 27, 2004 10:22 am    Post subject: Reply with quote

Prabhakarp,

This might help you,
http://www.mvsforums.com/helpboards/viewtopic.php?t=2287

Also, I would like to know from which library you are executing the tool ? Is that concatenated to your SYSEXEC ? Else, copy the REXI macro to ur default SYSEXEC PDS and try executing from there or concatenate the library which has REXI macro to ur SYSEXEC.

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group