OS/2, eCS & ArcaOS - Technical > Programming
Classic, Regina, Object and Open Object Rexx
Martin Iturbide:
Hello Jan-Erik
--- Quote from: Jan-Erik Lärka on October 01, 2024, 06:58:57 pm ---I would like to get your attention to push for an update to the wps integration stuff and enable it for ooRexx on OS/2, without reinventing the wheel from scratch.
The problem is that IBM have a cross licensing agreement with another party (Amiga)?!
--- End quote ---
I don't have knowledge on this area, so I'm just asking, what kind of WPS and ooRexx integration do you expect or need?
Is it something like "IBM's Object Rexx has this WPS integration, I need the same one for ooRexx, because it is currently missing on that open open source project"?
Is there too much WPS integration on IBM's Object Rexx? Will it be a long project to do that?
Regards
Jan-Erik Lärka:
NetRexx
* The last version that ran with our Java (1.)6 was 3.04, as they then compiled it to require features introduced with Java (1.)8 in later NetRexx versions
* I understand that NetRexx create byte code that the java engine run, but with the additions of Rexx like libraries that add useful features that resemble Rexx.
* It claim to be like Rexx, but due to the underlying requirement to follow a ceratin structure the code one can write, need to have a certain structure that I don't recognize from Rexx.
Consensus was that Object Rexx for OS/2 wasn't good enough (good features, but bad memory handling, speed and stability due to the complier used), thus not set as default.
WPS integration
Both IBM Classic Rexx (crexx from now on) and IBM Object Rexx (orexx from now on) is integrated with the system, that's why you need to switch rexx interpreter with the command SWITCHRX (see the code of SWITCHRX.CMD in your OS2-folder) that aslo reregister files such as
REXXSC.DLL
OREXXSC.DLL
REXXSOM.DLL
OREXXSOM.DLL
REXXWPS.DLL
OREXXWPS.DLL
that enable crexx and orexx to be the scripting engine for applications as well as talk to the wps through SOM etc. etc. that interact with the scripting engine to launch it from command line without first typing a scripitng engine name such as rexx <script_to_run.ext>. Guess DB2 intergation and other rexx enabled applications use the currently enabled scripting engine.
When I talk about WPS integration I also mean the programming interface "rexxsaa", not just SOM or WPS.
--- Code: ---/*
* Filename: dbug.cpp
* Author: JanErik
* Created: Sun Oct 6 2024
* Purpose: Compile into dbug.exe and debug "it" with Watcom Visual Debugger (wdw) to correct libraries (dll:s) you write for rexx (see unimix rexx .dll)
* Changes:
*/
#define INCL_REXXSAA
#include <rexxsaa.h>
#include <iostream.h>
int main(int args, char *argn[]) {
LONG return_code; /* interpreter return code */
RXSTRING argv[1]; /* program argument string */
RXSTRING retstr; /* program return value */
SHORT rc; /* converted return code */
CHAR return_buffer[250]; /* returned buffer */
/* build the argument string */
CHAR retval[1];
retval[0] = '\0';
if( args > 2 ) {
MAKERXSTRING( argv[0], argn[1], strlen( argn[1] ) );
} else {
MAKERXSTRING( argv[0], retval, strlen( retval ) );
}
/* set up default return */
MAKERXSTRING(retstr, return_buffer, sizeof(return_buffer));
return_code = RexxStart(args, /* one argument */
argv, /* argument array */
argn[1], /* REXX procedure name */
NULL, /* use disk version */
NULL, /* default address name */
RXCOMMAND, /* calling as a subcommand */
NULL, /* no exits used */
&rc, /* converted return code */
&retstr); /* returned result */
/* process return value */
/* need to return storage? */
if (RXSTRPTR(retstr) != return_buffer)
DosFreeMem(RXSTRPTR(retstr)); /* release the RXSTRING */
return 0;
}
--- End code ---
There's a nifty script by Steven Levine out there that can enable one or the other on the fly, but then one can't rely on that a certain is enabled but has to fall back to always has to assume crexx to start with. >:(
crexx is not aware of any of the new features, so with it still the default it is not really useful.
Navigation
[0] Message Index
[*] Previous page
Go to full version