Re: C errno from COBOL

2018-10-11 Thread Charles Mills
lf Of Frank Swarbrick Sent: Thursday, October 11, 2018 2:35 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C errno from COBOL Thanks Allan, that looks to do the trick! I was going to ask how you found the __errno() function, but now I see it in errno.h: #ifndef __NO_STATIC #undef errno exter

Re: C errno from COBOL

2018-10-11 Thread Frank Swarbrick
Looks like you can also use call '@@ERRNO' if you don't want to specify PGMNAME(LongMixed). From: IBM Mainframe Discussion List on behalf of Frank Swarbrick Sent: Thursday, October 11, 2018 3:34 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C e

Re: C errno from COBOL

2018-10-11 Thread Frank Swarbrick
s was talking about, so both of us missed it. Great! Frank From: IBM Mainframe Discussion List on behalf of Allan Kielstra Sent: Thursday, October 11, 2018 1:21 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C errno from COBOL Hi Frank: I'm not sure if

Re: C errno from COBOL

2018-10-11 Thread Allan Kielstra
Hi Frank: I'm not sure if this will work for all times and in all cases. Here is my C program simulating a C API that sets errno: #include int cfunc() { errno = 8; } Compiled with no options with z/OS V2.3 XL C/C++ Here is a small COBOL program I wrote CBL PGMNAME(LongMixed)

Re: C errno from COBOL

2018-10-11 Thread Charles Mills
ERV.UA.EDU] On Behalf Of Frank Swarbrick Sent: Wednesday, October 10, 2018 3:39 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C errno from COBOL I don't have a license to use the XL C compiler, by the way. From: IBM Mainframe Discussion List on behalf of Frank Swa

Re: C errno from COBOL

2018-10-10 Thread Charles Mills
October 10, 2018 4:06 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: C errno from COBOL Looking at errno.h, errno is #defined as the result of a function call that you might be able to do from COBOL. I am not adept enough to make sense out of the macro and say "this call is what you need to do.&q

Re: C errno from COBOL

2018-10-10 Thread Charles Mills
e: C errno from COBOL I don't have a license to use the XL C compiler, by the way. From: IBM Mainframe Discussion List on behalf of Frank Swarbrick Sent: Wednesday, October 10, 2018 4:36 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: C errno from COBOL Does a

Re: C errno from COBOL

2018-10-10 Thread Frank Swarbrick
I don't have a license to use the XL C compiler, by the way. From: IBM Mainframe Discussion List on behalf of Frank Swarbrick Sent: Wednesday, October 10, 2018 4:36 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: C errno from COBOL Does anyone know of a simple w

C errno from COBOL

2018-10-10 Thread Frank Swarbrick
Does anyone know of a simple way to retrieve the value of the C runtime's 'errno' variable after calling a C RTE function from Enterprise COBOL? -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lis