_Gtab appears to be an LE internal function whose address is in the word at
CEELAA offset X'20'. Is that something you can work with?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Charles Mills
Sent: Wednesday, October 10, 2018 4:06 PM
To: [email protected]
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." Perhaps someone
else on this list is. The macro logic is fairly long and convoluted and I am
reluctant to post that much Copyright IBM intellectual property here.

If I am reading it right, it defines _Gtab as a function that takes a 32-bit
signed integer and returns the address of an address.

Then errno is defined as a 32-bit integer at that second address after
calling _Gtab with a 0.

Others can probably do better, but you might try playing with that.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Frank Swarbrick
Sent: Wednesday, October 10, 2018 3:39 PM
To: [email protected]
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 <[email protected]> on behalf of
Frank Swarbrick <[email protected]>
Sent: Wednesday, October 10, 2018 4:36 PM
To: [email protected]
Subject: C errno from COBOL

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 [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to