On z/VM and my RHEL 7 laptop, I have this tool that I use.
Perhaps you can extend it to fit your purpose.
On a command line, I type:
calc <rexx statement>
[<mydir>]$ cat ~/sbin/calc
#!/usr/bin/rexx
/* REXX */
trace errors
rc = 0
PARSE ARG expr
IF expr <> '' THEN DO
numeric digits 20
interpret 'Say' expr
EXIT
end
exit rc
===
I hope this helps!
Michel Beaulieu
IBM Services (Canada)
|*|
________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of
John McKown <[email protected]>
Sent: March 16, 2020 10:23 AM
To: [email protected] <[email protected]>
Subject: Re: Scripting REXX thought -- inspiration or insanity?
On Mon, Mar 16, 2020 at 8:57 AM Lionel B Dyck <[email protected]> wrote:
> OS/2 had a command called REXXTRY that would do what you want. I was able
> to get permission from IBM to distributed it years ago (just after OS/2
> ceased to be marketed) and you can get a copy at
> http://lbdsoftware.com/rexxtry.zip
>
> Have not tried it under OMVS but in theory it should work, perhaps with
> minor tweaking (one would hope).
>
Yes, there is REXXTRY. But it doesn't do what I am describing. It will do
some of it, sort of. It will accept a REXX statement from the input and
execute it. There is no way to put the statement(s) to execute on the
command line itself. And there is no implicit loop capability which
automatically reads the input file(s) and assigns the record content to a
variable, $_ in my example. Also, it will not accept multiple input
statements and create a REXX program from them all, then run it. It is, at
best, clumsy. At least in my opinion.
>
>
> Lionel B. Dyck <sdg><
> Website: http://www.lbdsoftware.com
>
> "Worry more about your character than your reputation. Character is what
> you are, reputation merely what others think you are." - John Wooden
> to [email protected] with the message: INFO IBM-MAIN
>
--
People in sleeping bags are the soft tacos of the bear world.
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN