I believe that the real issue is that the binder api is packaged as a DLL,
and AFAIK you need to run under LE and use LE/"C" linkage conventions to
call it.
Consider writing an RFC for "*z/OS MVS Program Management: Advanced
Facilities" *to clarify whether Metal C is supported with the C/C++ DLL
Binder APIs.

In theory it would be possible to run a Metal C program within an LE
environment, you would need assembler stubs for all of the binder apis that
could be called from Metal C with MVS linkage and would then call the LE/C
binder apis with LE "C" linkage conventions.

It seems easier to either:
a)  write in LE C or C++
b) write in Metal C but call the IEWBIND assembler APIs.
     Maybe use EDCDSECT to convert mapping DSECTS to C structs.
     Are they the same mappings as the C/C++ API?  I haven't checked.


On Tue, Aug 14, 2018 at 1:51 PM, Farley, Peter x23353 <
[email protected]> wrote:

> Indeed.  As the XLC/C++ Users Guide states:
>
> __IBM_METAL__ is predefined to 1 when METAL is in effect.
>
> But the Binder API header __iew_api.h does not test it.
>
> Peter
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Paul Gilmartin
> Sent: Tuesday, August 14, 2018 1:14 PM
> To: [email protected]
> Subject: Re: Using the Binder API and MetalC
>
> On Mon, 13 Aug 2018 23:07:51 +0000, Farley, Peter x23353 wrote:
>
> >No feature tests in the header file.  As long as the header hasn't
> already been used it unconditionally defines the data areas and the
> function prototypes.
> >
> >I'd accept feature test macro(s) as a reasonable alternative as long as
> MetalC programs can use just the data area definitions and not the function
> prototypes.
> >
> I'd think it most likely that the MetalC compiler defines a feature macro,
> but
> the Binder API header lacks a test for it.
>
> --
>
>
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by
> e-mail and delete the message and any attachments from your system.
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to