Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread McKown, John
I know that I've seen somebody do this before. But I cannot remember how they did it. Does anybody have a code snippet that shows how to call a C subroutine like sprintf() or strncmp() from HLASM? Also the compile & link JCL would be appreciated. I've tried reading the LE manuals and the C manua

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Gord Tomlin
You want to make sure you are not creating and destroying a LE environment for every call, or it will get expensive. If your calling Assembler program is Language Environment-conforming, have a look in "z/OS V1R12.0 Language Environment Writing ILC Applications", section "14.5 Assembler Main Call

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Lloyd Fuller
. Lloyd - Original Message From: Gord Tomlin To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Sent: Fri, October 14, 2011 10:28:26 AM Subject: Re: Need simple example - Calling c subroutine like printf from HLASM program You want to make sure you are not creating and destroying a LE environment for

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Paul Gilmartin
On Oct 14, 2011, at 09:37, Lloyd Fuller wrote: > You also want to be careful about the parameters. Some C routines expect > values > on the stack (i.e., in-line in the parameter list) and others expect pointers > to > the values with most using a mix. That is typically my problem calling or >

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Farley, Peter x23353
es. HTH Peter > -Original Message- > From: IBM Mainframe Assembler List [mailto:ASSEMBLER- > l...@listserv.uga.edu] On Behalf Of McKown, John > Sent: Friday, October 14, 2011 9:33 AM > To: ASSEMBLER-LIST@LISTSERV.UGA.EDU > Subject: Need simple example - Calling c subroutine

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread McKown, John
A.EDU] On Behalf Of Farley, > Peter x23353 > Sent: Friday, October 14, 2011 11:31 AM > To: ASSEMBLER-LIST@LISTSERV.UGA.EDU > Subject: Re: Need simple example - Calling c subroutine like > printf from HLASM program > > John, if you are playing with C subroutines and you don't

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Lloyd Fuller
: ASSEMBLER-LIST@LISTSERV.UGA.EDU Sent: Fri, October 14, 2011 12:11:53 PM Subject: Re: Need simple example - Calling c subroutine like printf from HLASM program On Oct 14, 2011, at 09:37, Lloyd Fuller wrote: > You also want to be careful about the parameters. Some C routines expect >values &g

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-10-14 Thread Steve Comstock
On 10/14/2011 7:33 AM, McKown, John wrote: I know that I've seen somebody do this before. But I cannot remember how they did it. Does anybody have a code snippet that shows how to call a C subroutine like sprintf() or strncmp() from HLASM? Also the compile& link JCL would be appreciated. I've

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-11-07 Thread Phil Sidler
ceetest CEEENTRY PPA=mainppa CALL PRINTF,string CEETERM RC=0 * string DCC'Hello world!' DCX'15' DCX'00' * mainppa CEEPPA , * EJECT , * CEEDSA , CEECAA , * ENDceetest

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-11-07 Thread Phil Sidler
And a little more complex example. Haven't run this in a long time, not sure it's correct. ceetest2 CEEENTRY PPA=mainppa,BASE=11,AUTO=DSA_SIZE * TIME DEC,ZONE=GMT STR0,TIMEGMT STR1,DATEGMT TIME DEC,ZONE=LT STR0,TIMELOC STR1

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-11-07 Thread Steve Comstock
On 11/7/2011 7:34 PM, Phil Sidler wrote: ceetest CEEENTRY PPA=mainppa CALL PRINTF,string CEETERM RC=0 * string DCC'Hello world!' DCX'15' DCX'00' * mainppa CEEPPA , * EJECT , * CEEDSA , CEECAA , * EN

Re: Need simple example - Calling c subroutine like printf from HLASM program

2011-11-07 Thread Martin Truebner
Steve, >> One of those strange timing things where I see a reply before I see the original question. No, not realy. The request was posted on 14. of October (on a Friday). -- Martin Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE more at http://www.picapcpu.de