Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

PL1-L - Diskussion über PL/1-Interface für PCRE (Perl compatible Reg. Ex)

Subject:

Re: calling C from PL/I....

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

PL1 (language) discussions <PL1-L@LISTSERV.DARTMOUTH.EDU>

Date:

2014.02.26 12:55:08


Hi, Bernd.

On 02/26/2014 12:03 PM, Bernd Oppolzer wrote:
> Hi D.,
>
> just interested:
>
> how will the PL/1 interface to the C package be presented to the users?
> As source code, or precompiled?
>

It is my indention, and Z.'s too, I believe, to distribute, the PCRE library
in source code format, as well as pre-built text libraries for sites that do not
have the C compiler, either in z/OS or z/VM. Everything will be provided in
source code for sites to make whatever changes they see fit to make.

In z/OS this is straightforward, now that you have solved the problem of how to
correctly call the C PCRE routines from PL/I. A site that wants to use the
provided COBOL and/or PL/I APIs to PCRE will be expected to have a "modern"
COBOL or PL/I compiler available.

In the z/VM environment the PCRE code will be distributed with both the C source
code and the pre-compiled text library for PCRE. z/VM does now have available
the latest release of IBM's C/C++ compiler, but it doesn't have either of the
two up to date COBOL and PL/I compilers that z/OS does........maybe this will
prompt P. E at IBM to release the modern PL/I compiler for the z/VM
environment....:-)

Since both z/VM and z/OS have the modern C/C++ compiler available, what you are
suggesting is write the wrapper code in "C", instead of PL/I, for both
environments and include that code, both source and compiled, in the
distribution....is that correct?

Have a good one, too.

DJ


> I've had no time so far to look at the distribution that Z.A.
> presents
> on his website, if it is source code that still has to be compiled on z/OS
> or any other format. If it is C source code - and the COBOL interface
> maybe COBOL source code - then you should also distribute your PL/1
> solution as source code.
>
> But in this case, you should IMO not require a current release. That's why
> I would suggest a C glue function which builds a PL/1 compatible interface
> that can be handled by very old PL/1 compilers, too.
>
> When you do this, you don't even need to distribute PL/1 source code,
> nor executables. Only some C glue code, and a description, how to use
> this modified interface to the original C package from some "vintage" PL/1.
>
> Kind regards
>
> Bernd
>
>
>
> Am 26.02.2014 18:52, schrieb D.J.:
>> Hi, Bernd.
>>
>> I'm glad this all makes perfect sense to you....:-)  and it does to me
>> now, as well after you have explained it.....many thanks.
>>
>> Yes the options are indeed implemented in the PL/I caller as bit strings
>> that are AND-ed together.
>>
>> I'm planning on writing the glue code using the new z/OS PL/I
>> compiler....it will take as parameters the needed stings and integers
>> using a parameter list that the old PL/I compiler on z/VM can create
>> (that is to say all parameters are passed in via BYADDR) and then call
>> the C routines, passing the parameters to it via BYVALUE/BYADDR as
>> needed.
>>
>> Thanks again.
>>
>> DJ
>>
>

--
D.J.

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie