Re: Simple C language dynamic CALL's?
It’s the same for z/OS. There is a chapter dedicated to ILC in the books https://www.ibm.com/docs/en/zos/2.4.0?topic=environment-zos-language-writing-interlanguage-communication-applications > On 20 Mar 2023, at 12:53 pm, Farley, Peter > <031df298a9da-dmarc-requ...@listserv.ua.edu> wrote: > > Thanks, John, that is enlightening but it is VSE not z/OS. I will search > for something similar in the z/OS docs. > > -Original Message- > From: IBM Mainframe Discussion List On Behalf Of > John McKown > Sent: Sunday, March 19, 2023 8:26 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Simple C language dynamic CALL's? > > Function pointers and fetch() > > https://www.ibm.com/docs/en/zvse/6.2?topic=c-edcxbf11 > >> On Sun, 19 Mar 2023, 15:02 Farley, Peter, < >> 031df298a9da-dmarc-requ...@listserv.ua.edu> wrote: >> >> The major z/OS programming languages (COBOL, PL/I, HLASM) allow one to >> write a subroutine and separately compile and link it and then call >> that subroutine dynamically at runtime without a whole lot of fuss. I >> think even VS FORTRAN programming supports this capability. >> >> From the reading I have done in the C language reference and runtime >> library manuals, it appears to me that dynamic subroutine calls in C >> can only be accomplished by setting up the separately compiled >> subroutine(s) in a DLL. >> >> Is that a correct reading of the facts? Or is there a simpler >> (non-DLL) way to set up single-procedure dynamically called subroutines in C? >> >> The target environment is z/OS batch, not CICS or web. >> >> Peter > -- > > 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Simple C language dynamic CALL's?
On Sun, 19 Mar 2023 20:01:30 +, Farley, Peter wrote: >Or is there a simpler (non-DLL) way to set up single-procedure dynamically >called subroutines in C? > Did you look at the pragma linkage options ? Cheers, Jantje. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Simple C language dynamic CALL's?
Thanks, John, that is enlightening but it is VSE not z/OS. I will search for something similar in the z/OS docs. -Original Message- From: IBM Mainframe Discussion List On Behalf Of John McKown Sent: Sunday, March 19, 2023 8:26 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Simple C language dynamic CALL's? Function pointers and fetch() https://www.ibm.com/docs/en/zvse/6.2?topic=c-edcxbf11 On Sun, 19 Mar 2023, 15:02 Farley, Peter, < 031df298a9da-dmarc-requ...@listserv.ua.edu> wrote: > The major z/OS programming languages (COBOL, PL/I, HLASM) allow one to > write a subroutine and separately compile and link it and then call > that subroutine dynamically at runtime without a whole lot of fuss. I > think even VS FORTRAN programming supports this capability. > > From the reading I have done in the C language reference and runtime > library manuals, it appears to me that dynamic subroutine calls in C > can only be accomplished by setting up the separately compiled > subroutine(s) in a DLL. > > Is that a correct reading of the facts? Or is there a simpler > (non-DLL) way to set up single-procedure dynamically called subroutines in C? > > The target environment is z/OS batch, not CICS or web. > > Peter -- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Simple C language dynamic CALL's?
DLL is not simple to me, maybe because I haven't ever had to do it. There are no such hoops to jump through in other HLL's (even HLASM LINK or LOAD/BASR is simple by comparison). No, a system() call does not solve the need. Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Charles Mills Sent: Sunday, March 19, 2023 8:13 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Simple C language dynamic CALL's? Is a DLL *not* simple? (Serious question. I have never done it but isn't it just a couple of compile and link options?) Does the system() call solve your need? Charles -- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Simple C language dynamic CALL's?
Function pointers and fetch() https://www.ibm.com/docs/en/zvse/6.2?topic=c-edcxbf11 On Sun, 19 Mar 2023, 15:02 Farley, Peter, < 031df298a9da-dmarc-requ...@listserv.ua.edu> wrote: > The major z/OS programming languages (COBOL, PL/I, HLASM) allow one to > write a subroutine and separately compile and link it and then call that > subroutine dynamically at runtime without a whole lot of fuss. I think > even VS FORTRAN programming supports this capability. > > From the reading I have done in the C language reference and runtime > library manuals, it appears to me that dynamic subroutine calls in C can > only be accomplished by setting up the separately compiled subroutine(s) in > a DLL. > > Is that a correct reading of the facts? Or is there a simpler (non-DLL) > way to set up single-procedure dynamically called subroutines in C? > > The target environment is z/OS batch, not CICS or web. > > Peter > -- > > 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Simple C language dynamic CALL's?
Is a DLL *not* simple? (Serious question. I have never done it but isn't it just a couple of compile and link options?) Does the system() call solve your need? Charles -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Simple C language dynamic CALL's?
The major z/OS programming languages (COBOL, PL/I, HLASM) allow one to write a subroutine and separately compile and link it and then call that subroutine dynamically at runtime without a whole lot of fuss. I think even VS FORTRAN programming supports this capability. >From the reading I have done in the C language reference and runtime library >manuals, it appears to me that dynamic subroutine calls in C can only be >accomplished by setting up the separately compiled subroutine(s) in a DLL. Is that a correct reading of the facts? Or is there a simpler (non-DLL) way to set up single-procedure dynamically called subroutines in C? The target environment is z/OS batch, not CICS or web. Peter -- 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN