It looks like CEEPCALL is used to call DLL functions.
However I've not gotten it to work yet.  This is what I've tried for printf():

prntit2  ceeentry main=YES
         ceepcall printf,(fmtstr,3,str),,mf=(E,PARMS3)
         ceeterm
ppa      ceeppa ,
fmtstr   dc    c'Test %d: %s.',x'0'
str      dc    c'one two three',x'0'
         ceedsa ,
parms3   ceepcall ,(0,0,0),mf=L
         ceecaa ,
         end   prntit2

It compiles and links (binds), but when I run it the output is "ECTEXT".

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Farley, Peter
Sent: Tuesday, June 6, 2023 11:59 AM
To: [email protected]
Subject: [EXTERNAL] Re: Calling C functions from HLASM

GIYF.  Using "site:ibm.com ldap_init", the fourth hit leads to IBM 
documentation for the z/OS V2.3 "IBM Tivoli Directory Server for z/OS", and one 
of the pages there ("Compiling, linking, and running a program") addresses your 
questions:

https://urldefense.com/v3/__https://www.ibm.com/docs/en/zos/2.3.0?topic=programming-compiling-linking-running-program*compiling__;Iw!!EP3Ar9QBfU06DzGV!B3gdk9L4qNt8hnODo9FAbhU7yVG9XzojXagK_L4Z_bLfQQjV477tMUQPZrCXoMdK2IQ9OaPxvH7E9BYXXAdLLT6741DOzIp8w1Nrxs_XFJc$

Looks like the C DLL is in the "/usr/lib" directory in the Unix file system 
(file name GLDCLDAP) and your binder step needs a "side deck" named GLDCLDAP.x 
to get the DLL stub into your executable.  No PDS or PDSE library for the 
executable code, just the Unix copy.

Welcome to the future.

As I said previously, for how to actually USE that DLL from HLASM you need to 
do some serious reading.  There may, in fact, be no such specific 
documentation, in which case you would have to open a support ticket with IBM 
to get help.

Peter

-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf 
Of Dave Clark
Sent: Tuesday, June 6, 2023 1:34 PM
To: [email protected]
Subject: Re: Calling C functions from HLASM

"IBM Mainframe Assembler List" <[email protected]> wrote on
06/06/2023 01:04:43 PM:
> Many of the "long name" functions have 8-byte names as alias's.

        OK, so how would I find out the aliases for these C functions?

ldap_init
ldap_open
ldap_bind_s
ldap_simple_bind_s
ldap_unbind_s
ldap_search_s
etc.

Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331





*********************************************************************************************
This email message and any attachments is for use only by the named
addressee(s) and may contain confidential, privileged and/or proprietary
information. If you have received this message in error, please
immediately notify the sender and delete and destroy the message and all
copies. All unauthorized direct or indirect use or disclosure of this
message is strictly prohibited. No right to confidentiality or privilege
is waived or lost by any error in transmission.
*********************************************************************************************

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.

The information contained in this electronic communication and any document 
attached hereto or transmitted herewith is confidential and intended for the 
exclusive use of the individual or entity named above. If the reader of this 
message is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, you are hereby notified that any 
examination, use, dissemination, distribution or copying of this communication 
or any part thereof is strictly prohibited. If you have received this 
communication in error, please immediately notify the sender by reply e-mail 
and destroy this communication. Thank you.

Reply via email to