× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: REXX from command line (was text equation)
  • From: bmorris@xxxxxxxxxx
  • Date: Wed, 22 Dec 1999 10:45:09 -0500




>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
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.