using external shared library on Linux server

mosfin

Member
i try to use Linux shared library for Regular Expression matching, but unfortunately in NETUI(desktop) client
it fails to run/load, gives error: "Unable to evaluate expression with UNKNOWN value in argument (4391)."
Notes:
1. I posted this in QAD's MFG/PRO forum, two months ago and didn't get any response
2. NETUI client is actually Microsoft.NET wrap/tier above character 4GL code
3. running same code in CHUI(character) client gives no errors, and seems worknig
4. i'm using OpenEdge 10.1B03
5. i want to use Regular Expressions, since Progress/OpenEdge relevant features: match,can-do are not
strong enough

can anyone help ?
thanks,
M
 

mosfin

Member
since no one responsed to my post, i wrote my own 4gl code, that simulates "RegEx-like" pattern matching
(well, more like enhanced VBA Like operator), i hate re-inventing wheels, and therefore still waiting for someone to explain to me why external shared object library (not just Regex), will not load/run in MFGPRO/QAD .NET client

thanks,
M
 

TomBascom

Curmudgeon
Nobody was able to explain it because you posted no code.

On the surface it also seems like nonsense. I must be misunderstanding but you seem to expect a .NET client to somehow magically invoke a Linux DLL.
 

mosfin

Member
Tom,
AFAIK (please correct me if i'm wrong) QAD .NET client is a wrapper environment, that takes over the input and output devices, and communicates behind the scenes with the OpenEdge server as telnet character client, so the user interface looks like .NET on his Windows PC, but the program logic is still in 4gl code programs, coded for character mode.
Now, my question is, why when i initiate Telnet session to the server, and start character client,
the external shared library (e.g: regex.so) loads and executes OK, but when i start the .NET client,
as soon i run the program that uses this library, it crashes and gives this error:
"Unable to evaluate expression with UNKNOWN value in argument (4391)."

regarding the code, although i think its not the cause for the problem (it runs in character client, isn't it?)
i am attaching it here as you requested
 

Attachments

  • regex..txt
    1.2 KB · Views: 14

TomBascom

Curmudgeon
I guess I'd have to wonder where the message came from. Because there doesn't seem to be an obvious way for it to have been generated by the code that you posted (which looks like your Linux test case, not your .NET wrapper code).

It seems to me that it likely came from the some code that tries to call your regex code.

I have no idea how the QAD code works -- but your description hasn't changed my thought that you're running 4GL from a windows session and hoping that it is going to invoke something on the Linux side.

I think that somewhere in you ".NET" code you must be saying:

x = xReMatch( pattern, text, flags ).

The, I suspect, you are trying to use "x" which is where the message re: an unknown value comes into play.

I would add some debugging code before and after your code that launches it. Something like this:
Code:
message substitute( "Before: [&1] [&2] [&3] [&4] [&5]", opsys, x, pattern, text, flags ).
x = xReMatch( pattern, text, flags ).
message substitute( "After: [&1] [&2] [&3] [&4] [&5]", opsys, x, pattern, text, flags ).
 

mosfin

Member
i'm sorry if i wasn't clear, let me add some more detail:
our Linux server with the QAD ERP Application, actually runs 3 elements:
DB(DataBase server),AS(Application Server),WS(Web Server)
exactly the same 4gl programs that constituate the QAD ERP application,
are executed whether run in character client (initiated by user connecting to the server with Telnet)
or run by the .NET Client, which does essentially the same, i.e: connects to the server
as telnet user (only with special userid: dotnet), and runs exactly the same 4gl programs
mayb by using the AS.
So, the application logic (4gl code) actually runs on the server in both cases,
the .NET client translates the output from the character 4gl programs(which is pure text)
into HTML formatted pages that are viewed by the user, and sends to the server
the user's keyboard entries.

when i modify program logic i modify ONLY the Progress 4gl code, i do not use .NET
and i even cannot use your "debugging" code, because the program crashes as soon it gets loaded
(before executing the 1st line !)
my guess that somehow the way the .NET client (or the AS) start the 4gl code in a different way
than a direct (telnet) character client.
 
There is no way to run telnet within .Net program. We did chui interface for our system and then added windows interface.
.Net/windows intraface can execute the same 4gl code as 4GL windows client or through Aplication server.
If it is windows client there is no way to execute code you posted. Cause .so is not available on Windows.
If it is application server resided on the same server telnet session connects to db, then it is possible to execute this code. And there isnt any restriction.
It is easy to indetify what method used.
Appserver has SESSION:BATCH-MODE = true and SESSION:REMOTE = true.
You can trace your program as

output to 1.txt append
message SESSION:BATCH-MODE SESSION:REMOTE.
output close.

If first line doesnt execute then just check appserver logs for errors.
 

tamhas

ProgressTalk.com Sponsor
It may be that you need to ask this question on a QAD forum since this sort of .NET to telnet screen scrapping solution is, shall we say, idiomatic to QAD. Non-QAD people are unlikely to have any experience with that approach since I don't know anyone else who has done it that way.
 
Top