|
Okay... I have this REXX calculator right now I can use with
STRREXPRC parm('1+2*3')
What I would *like* to do is be able to say
eval '1+2*3'
and have the answer come up as a program message
sndpgmmsg is what I would use in CL.
Thinking about all the pieces that need to fit together...
I think I would need to be able to return a parameter
from REXX to pass to a CL that would do the SNDBRKMSG.
then I would create a CMD for the CL wrapper for the
REXX program.
Okay, is there a URL for an online book I can go to for
the REXX interpreter for the AS/400?
Regards,
Jim Langston
bmorris@ca.ibm.com wrote:
> >Date: Tue, 21 Dec 1999 07:37:33 -0800
> >From: Jim Langston <jlangston@conexfreight.com>
> > ...
> >Now I only have one question. How do I run a REXX procedure
> >from the command line?
> > ...
>
> Jim, you can use STRREXPRC, or you can add a CMD interface.
> If you use a CMD, say *REXX as the CPP and then you give the
> source file and member with the REXX proc, and instead of
> getting the argument directly, you get it in the form
> PARMNAME('parmvalue').
>
> For example, if you have this PARM in your command:
> PARM KWD(EXPR) TYPE(*char) len(500)
> You would code this in your REXX to get the parameter into
> in variable expr:
> parse arg "EXPR('"expr"')"
> instead of just
> parse arg expr
>
> Here's a cool little rexx calcalator:
> /* */
> say "Enter expressions. Enter a blank line to exit."
> do forever
> parse pull expr
> if (expr = '') then leave
> interpret expr
> end
> return
>
> Here's a session using it (lines marked > are input lines):
>
> Enter expressions. Enter a blank line to exit.
> > i=3
> > j=4
> > say i+j
> 7
> > i='abc'
> > say substr(i,1,2)
> ab
> > do i = 1 to 3; say i; end;
> 1
> 2
> 3
> >
> Press ENTER to end terminal session.
>
> Barbara Morris (woman of the zeros)
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.