There is a mainframe mailing list named ibm-main where from time to time there are discussions about Rexx and ooRexx.

In the course of an e-mail exchange David Crayford attempted to port ooRexx to z/OS yesterday and came up with the following remarks in that context:



   -------- Forwarded Message --------
   Subject:     Re: Ad TCP/Socket programs in REXX (Re: Mainframe REXX (Re: 
Badmouthing Rexx and
   ooRexx - again (Re: zOSMF and zOWE for non-mainframers
   Date:        Tue, 7 Mar 2023 15:45:41 +0800
   From:        David Crayford
   Reply-To:    IBM Mainframe Discussion List <ibm-m...@listserv.ua.edu>
   To:  ibm-m...@listserv.ua.edu
   Newsgroups:  bit.listserv.ibm-main



   On 7/3/23 02:39, Rony G. Flatscher wrote:
    On 06.03.2023 02:43, David Crayford wrote:
    I'm sure your BSF4ooRexx is a really nice library. But it's moot point 
talking about it on
    this forum because ooRexx has not been ported to z/OS, I'm sorry to say 
that I think it
probably never will be.

    That would be unfortunate and actually a little bit unprofessional if other 
non-IBM-invented
    and great software gets ported to it. OTOH seeing the FUDding towards 
ooRexx it is not a
    surprise, keeping everyone in the wait-and-see room (the purpose of FUD 
marketing).

    Unless, of course, there is a REXX enthusiast who has the time and skills 
to do the port. I
can tell you from experience, it's not easy.

    Your experience stems from the days where ooRexx was coded to be 32-bit 
only, with quite a few
    hacks from its history at IBM (written originally at a time where C++ was 
not yet
    standardized, every company had its own C++ (pre-)compiler, then the need 
to have it run on
    OS/2, AIX, Windows and the like).

    In the meantime the kernel got totally rewritten and the build system 
changed from autotools
    to CMake, making it possible to create ports of ooRexx with any bitness and 
operating system
    targets quickly.


   I did notice that CMake is being used for the build. That's good as IBM have 
ported CMake to
   z/OS. It's hidden away on a personal Github repo by an ex-IBMer who used to 
work in the Java JIT
   team. I may mention that to IBM.

   Anyway, I digress. ooRexx still have the same portability issues as before. 
For example, it
   assumes that 'phread_t' is a integer. On z/OS, System i, BSD etc it's an 
opaque type, a struct.

   In file included from 
/u/ts8004/git/ooRexx/common/platform/unix/SysSemaphore.hpp:51:
   /u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:70:36: error: no 
matching constructor
   for initialization of 'pthread_t'
        SysThread() : attached(false), _threadID(0) { ; }
                                       ^         ~
   /usr/include/sys/types.h:300:19: note: candidate constructor (the implicit 
copy constructor) not
   viable: no known conversion from 'int' to 'const pthread_t' for 1st argument
              typedef struct {
                      ^
   /usr/include/sys/types.h:300:19: note: candidate constructor (the implicit 
move constructor) not
   viable: no known conversion from 'int' to 'pthread_t' for 1st argument
   /usr/include/sys/types.h:300:19: note: candidate constructor (the implicit 
default constructor)
   not viable: requires 0 arguments, but 1 was provided
   In file included from 
/u/ts8004/git/ooRexx/rexxapi/client/ClientMessage.cpp:41:
   In file included from 
/u/ts8004/git/ooRexx/rexxapi/client/LocalAPIManager.hpp:47:
   In file included from 
/u/ts8004/git/ooRexx/common/platform/unix/SysSemaphore.hpp:51:
   /u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:86:17: error: cannot 
convert 'pthread_t'
   to 'uintptr_t' (aka 'unsigned long') without a conversion operator
             return (uintptr_t)_threadID;
                    ^~~~~~~~~~~~~~~~~~~~
   /u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:89:37: error: cannot 
convert 'pthread_t'
   to 'size_t' (aka 'unsigned long') without a conversion operator
        inline size_t hash() { return (((size_t)_threadID) >> :sunglasses: * 
37; }

   IBM warns about this in it's documentation
   https://www.ibm.com/docs/en/i/7.1?topic=ssw_ibm_i_71/apis/concep17.html

   Amazon have been fixing this bug in their C SDK 
https://github.com/awslabs/aws-c-io/issues/217

   There also appears to be bugs in SysThread where the "attached" member 
variable is not
   initialized in the constructor that takes a pthread_t argument.
   ... cut ...

Would someone be willing to tackle this?

After all, to get a proof of concept port to z/OS will definitely help a full 
port to that platform.

---

David Crayford promotes Lua (<http://lua-users.org/lists/lua-l/2013-08/msg00517.html>) and Python on the mainframe over REXX (and ooRexx). OTOH he seems to be technically interested and curious in various programming languages and many years ago obviously tried to port ooRexx to the mainframe to no avail. He works for a company that is specialized in mainframe software.

---rony

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to