Re: Calling C functions from HLASM

2023-06-07 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/07/2023 04:08:17 PM: > What's used in z/VSE to simulate DLL's is an object deck with XSD > entries in it for the list of functions in the single object deck. Then > you have to use the LE prelinker (EDCPRLK) to resolve those XSD entries --

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 03:07:14 PM: > DLLs on z/OS can be stored in PDSEs as well. But that does not help > you for z/VSE... I have PDSes for 3rd-party products. But, you're correct that IBM doesn't use them on z/VSE. For source and executables IBM

Re: [EXTERNAL] Re: Calling C functions from HLASM

2023-06-06 Thread Swarbrick, Frank
DLLs on z/OS can be stored in PDSEs as well. But that does not help you for z/VSE... -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, June 6, 2023 1:05 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: [EXTERNAL] Re: Calling C functions from

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 02:49:57 PM: > I don't believe VSE supports DLLs, so this may be all for naught. > Unless VSE has a non-DLL LDAP library. Oh, you're correct that z/VSE does not have a Linux file system where traditional DLL link libraries would be

Re: [EXTERNAL] Re: Calling C functions from HLASM

2023-06-06 Thread Swarbrick, Frank
: Calling C functions from HLASM "IBM Mainframe Assembler List" wrote on 06/06/2023 02:20:37 PM: > I got it working. Didn't properly allocate automatic (stack) storage > for the parameters in the earlier example. > > prntit2 ceeentry main=YES,auto=AUTOSZ > ceepcall pri

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 02:20:37 PM: > I got it working. Didn't properly allocate automatic (stack) > storage for the parameters in the earlier example. > > prntit2 ceeentry main=YES,auto=AUTOSZ > ceepcall printf,(fmtstr,3,str),,mf=(E,PARMS3) >

Re: [EXTERNAL] Re: Calling C functions from HLASM

2023-06-06 Thread Swarbrick, Frank
On Behalf Of Dave Clark Sent: Tuesday, June 6, 2023 12:17 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: [EXTERNAL] Re: Calling C functions from HLASM "IBM Mainframe Assembler List" wrote on 06/06/2023 02:09:21 PM: > It looks like CEEPCALL is used to call DLL functions. &

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 02:09:21 PM: > 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) >

Re: Calling C functions from HLASM

2023-06-06 Thread Swarbrick, Frank
t: Tuesday, June 6, 2023 11:59 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU 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 pa

Re: Calling C functions from HLASM

2023-06-06 Thread Farley, Peter
icket with IBM to get help. Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, June 6, 2023 1:34 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Calling C functions from HLASM "IBM Mainframe Assembler List" wrote on 06/06/

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 01:42:10 PM: > Have you considered wrapping the LDAP routines with your own C code? > Might make it easier. Yeah, longer execution code path, but if it gets > you in control then it's worth it. We don't have the C compiler. We just

Re: Calling C functions from HLASM

2023-06-06 Thread Rick Troth
Have you considered wrapping the LDAP routines with your own C code? Might make it easier. Yeah, longer execution code path, but if it gets you in control then it's worth it. -- R; <>< On 6/6/23 13:34, Dave Clark wrote: "IBM Mainframe Assembler List" wrote on 06/06/2023 01:04:43 PM: Many

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" 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.

Re: Calling C functions from HLASM

2023-06-06 Thread Rick Troth
Ah! I see. Yeah, that. On 6/6/23 12:22, Dave Clark wrote: Yes, I have called COBOL. However, calling COBOL means you have an up to 8-character internal name that matches an external name I can find in the system or user library. C function names can be longer than that and,

Re: Calling C functions from HLASM

2023-06-06 Thread Charles Mills
@LISTSERV.UGA.EDU Subject: Re: Calling C functions from HLASM "IBM Mainframe Assembler List" wrote on 06/06/2023 12:10:08 PM: > I really hesitate to mention this, being as it it mine, not really very > good code, but https://urldefense.com/v3/__https://github.com/ > JohnArchieMckown/utilit

Re: Calling C functions from HLASM

2023-06-06 Thread Farley, Peter
me mangling required there. Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, June 6, 2023 12:48 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Calling C functions from HLASM "IBM Mainframe Assembler List" wrote on 06/06/2023 12

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 12:10:08 PM: > I really hesitate to mention this, being as it it mine, not really very > good code, but https://urldefense.com/v3/__https://github.com/ > JohnArchieMckown/utilities-1/find/master__;!!E0nbmg29qrX0lQ! >

Re: Calling C functions from HLASM

2023-06-06 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 06/06/2023 11:55:30 AM: > Forgive me if you already know ... > > C requires a stack (at least), sometimes more for sake of minimizing the > surprise factor (for developers who think it's always a Unix thing). > After that, there's not much difference

Re: Calling C functions from HLASM

2023-06-06 Thread Farley, Peter
@LISTSERV.UGA.EDU Subject: Re: Calling C functions from HLASM I really hesitate to mention this, being as it it mine, not really very good code, but https://github.com/JohnArchieMckown/utilities-1/find/master And look at SKELETON.s file. Plesse be kind. The entire program is LE enabled, with LE

Re: Calling C functions from HLASM

2023-06-06 Thread Colin Paice
It is documented Combining C or C++ and Assembler programs which I have used in the past Colin On Tue, 6 Jun 2023 at 16:27, Dave Clark wrote: > Would someone show me an example of calling a C function from

Re: Calling C functions from HLASM

2023-06-06 Thread Farley, Peter
assembler program, you can call other C or C++ programs from the assembler. Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Rick Troth Sent: Tuesday, June 6, 2023 11:56 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Calling C functions from HLASM Forgive

Re: Calling C functions from HLASM

2023-06-06 Thread John McKown
I really hesitate to mention this, being as it it mine, not really very good code, but https://github.com/JohnArchieMckown/utilities-1/find/master And look at SKELETON.s file. Plesse be kind. The entire program is LE enabled, with LE startup and termination macros, from IBM. On Tue, Jun 6, 2023,

Re: Calling C functions from HLASM

2023-06-06 Thread Rick Troth
Forgive me if you already know ... C requires a stack (at least), sometimes more for sake of minimizing the surprise factor (for developers who think it's always a Unix thing). After that, there's not much difference (in my experience) to call a C routine than to call an assembler routine.

Calling C functions from HLASM

2023-06-06 Thread Dave Clark
Would someone show me an example of calling a C function from HLASM? I tried asking ChatGPT and got the following. I don't see how this will link from HLASM to the C function. PRINT NOGEN TITLE 'HLASM Calling ldap_open' USING *,12 LR 12,15