@Kirk. Thank you. I am sure that is clearly documented *if you know where to 
look*. I have this gripe that so often the answer to questions is essentially 
RTFM, the catch being you have to know which FM to R, and that is not always 
intuitive.

@Jerry, exactly. I almost posted *exactly* the same thing. How hard could that 
have been if IBM has the code to output the text in a utility program. 
__strerror2() ?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Kirk Wolf
Sent: Monday, September 10, 2018 6:18 AM
To: [email protected]
Subject: Re: How call BPXMTEXT from Posix STC

If you:

setenv("_EDC_ADD_ERRNO2", "1", 0);

then strerror(), perror(), etc will have some additional message text
related to the errno2.
It's not the entire thing, but it is often times useful.


On Mon, Sep 10, 2018 at 6:28 AM Jerry Callen <[email protected]> wrote:

> > Based on advice on another thread I am now calling errno2() on certain
> > socket errors. I get back an integer that I dutifully display in hex:
> >
> > XXX0123I errno2 = x'12345678'. Look up using BPXMTEXT.
> >
> > That message kind of offends me. When I get a basic library error I use
> > strerror() to convert it to text. I would like to convert errno2() to
> text,
> > rather than telling customers to go look it up for themselves.
>
> Likewise.
>
> A while back I went looking for some way to convert errno2 to a message
> without calling BPXMTEXT
> and got nowhere before I had to get back to Real Work (tm). It seems to me
> that either:
>
> * strerror() just ought to do it, or
> * there should be a dead-simple API.

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

Reply via email to