On 4/26/23 01:44, David Crayford wrote:
On 25/4/23 20:48, Rick Troth wrote:
good questions
The library that I want to call is "just C", pretty clean, standard
POSIX. My development platform is PC Linux. The package gets built
and tested on other platforms as often as I can drive that, notably
FreeBSD.
I don't have access to USS for dev/test. (But if anyone is offering ...)
There's no specific need to interrogate nor to set Rexx variables.
The goal is a function which takes arguments and returns a string.
The Rexx function has sub-functions named by the first argument. It
works a lot like Rexx/Sockets (return string is the RC followed by
either an error string or by desired results, if any).
Interfacing with Regina is pretty easy. Regina's header in this case
is named "rexxsaa.h", so presumably adheres to SAA norms. I confess I
have NOT TRIED linking against ooRexx. Thought I should first ask
others who have tread that road.
I suggest that you consider porting Regina to z/OS, which is highly
portable and easy to do. I have personally done it and even have a
patch file somewhere. Currently, it's compiled in ASCII mode, but it
can also support EBCDIC with some modifications to the lex lexer and
YACC parser. Keep in mind that z/OS REXX programming services are
mainly designed for HLASM and not HLL's. The best way to achieve good
performance is by creating a subcommand processor using CEEPIPI to set
up a pre-initialized LE environment and writing simple HLASM glue
code. Although I've done this before, it requires a lot of work and is
quite tedious just to use REXX https://github.com/daveyc/RTK.
I did some glue code for CMS once or twice to call C from Rexx. The
hardest part in that context (similar for MVS) is ensuring that LE is
instantiated. (And CEEPIPI is one way to do that, evidently. Good
suggestion.)
Calling Rexx from C or assembler (in CMS) is almost trivial.
I wonder if you could get your Regina fix into the collection at
https://github.com/ZOSOpenTools/?
In any case, your patch is interesting. I didn't see it under
https://github.com/daveyc/. Do share!
The project in this case is the message handler that I mentioned a few
weeks ago: works like CMS 'XMITMSG'. It includes an 'xmitmsg' command,
so could be called as a command, but seemed right to make it a function
too.
I'll include the Regina interface on GitHub "soon".
Thanks!
-- R; <><
On 4/25/23 08:37, Jeremy Nicoll wrote:
On Tue, 25 Apr 2023, at 13:29, Rick Troth wrote:
hello
I have a project where I want to call C from Rexx.
I've done this with Regina several times. Can someone tell me how, or
point to doco, or (best) lend a hand, calling C from ooRexx?
Do you have ooREXX running on a mainframe?
Which OS?
If z/OS ... Is the C program in LINKLIST? or a load lib? What
calling (register) convention is it written with - like a TSO CP,
or a job-step program, or what?
Are you expecting the C code to access contents of rexx
variables "by magic" or are you going to pass copies of
their values, or their addresses in storage, or what?
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN