Re: how to silence EDC5129I for function calls

2017-01-27 Thread Paul Gilmartin
On Fri, 27 Jan 2017 14:53:58 -0500, Rick Troth wrote:

>On 01/27/17 14:48, Charles Mills wrote:
>> I*think*  that generally that message is output by the application.
>> The application calls strerror() which returns that string,
>> and then the application prints it. I think your argument
>> is with the application, not LE.
>
>Sure, except the application in question is *ours* and there's no
>strerror() or perror() or sprintf() for this condition. What we're
>dealing with here is a call to stat() or equivalent against a file that
>is not there which we will then create.
> 
What's "equivalent" to stat()?

I agree with Charles.  System calls rarely issue messages; that's not kernel's
job.  System calls set ERRNO and the caller issues the message.

Does the problem occur with a minimal program that does only a stat() and
reports the error?  If so, numerous users would be reporting it and creating
SRs.

Google (and my experience) tells me that a frequent cause of ENOENT is
nonexistence of a directory along the path.

If the file is about to be created anyway, just do it: open( file, O_CREAT ... )

If you need to know whether the file is actually being created (perhaps you
intend to write a preamble the first time), stat() leaves a timing hazard:
two jobs running at the same time might both get ENOENT from stat()
and both create the preamble.  Better:

open( file, O_EXCL O_CREAT O_WRONLY ... )
if no error then
create preamble
else if EEXIST then
open( file, O_WRONLY ... )

(But you may still get the undesired message.)

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to silence EDC5129I for function calls

2017-01-27 Thread Charles Mills
What *is* the language? stat() and strerror() sound like C/C++. My C library
FM says of stat()

If unsuccessful, stat() returns -1 and sets errno to one of the following
values:
Error Code
Description
...
ENOENT
There is no file named pathname, or pathname is an empty string.

Nothing about printing a message. 

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Rick Troth
Sent: Friday, January 27, 2017 11:54 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: how to silence EDC5129I for function calls

On 01/27/17 14:48, Charles Mills wrote:
> I*think*  that generally that message is output by the application.
> The application calls strerror() which returns that string, and then 
> the application prints it. I think your argument is with the 
> application, not LE.

Sure, except the application in question is *ours* and there's no
strerror() or perror() or sprintf() for this condition. What we're dealing
with here is a call to stat() or equivalent against a file that is not there
which we will then create.


> Or perhaps I misunderstand the exact context of your question.

Or perhaps I haven't stated it well. (These things are so much easier in 
assembler or C).   :-)

-- R; <><




--
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: how to silence EDC5129I for function calls

2017-01-27 Thread John McKown
On Fri, Jan 27, 2017 at 1:53 PM, Rick Troth  wrote:

> On 01/27/17 14:48, Charles Mills wrote:
>
>> I*think*  that generally that message is output by the application.
>> The application calls strerror() which returns that string,
>> and then the application prints it. I think your argument
>> is with the application, not LE.
>>
>
> Sure, except the application in question is *ours* and there's no
> strerror() or perror() or sprintf() for this condition. What we're dealing
> with here is a call to stat() or equivalent against a file that is not
> there which we will then create.
>
>
> Or perhaps I misunderstand the exact context of your question.
>>
>
> Or perhaps I haven't stated it well. (These things are so much easier in
> assembler or C).   :-)


​Hum, what language are you using? Perhaps there is something in it to
suppress this, assuming it is part of the language's run time and not your
code.​



>
>
> -- R; <><
>


-- 
There’s no obfuscated Perl contest because it’s pointless.

—Jeff Polk

Maranatha! <><
John McKown

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to silence EDC5129I for function calls

2017-01-27 Thread Rick Troth

On 01/27/17 14:48, Charles Mills wrote:

I*think*  that generally that message is output by the application.
The application calls strerror() which returns that string,
and then the application prints it. I think your argument
is with the application, not LE.


Sure, except the application in question is *ours* and there's no 
strerror() or perror() or sprintf() for this condition. What we're 
dealing with here is a call to stat() or equivalent against a file that 
is not there which we will then create.




Or perhaps I misunderstand the exact context of your question.


Or perhaps I haven't stated it well. (These things are so much easier in 
assembler or C).   :-)


-- R; <><




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to silence EDC5129I for function calls

2017-01-27 Thread Charles Mills
I *think* that generally that message is output by the application. The
application calls strerror() which returns that string, and then the
application prints it. I think your argument is with the application, not
LE.

Or perhaps I misunderstand the exact context of your question.

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Rick Troth
Sent: Friday, January 27, 2017 11:38 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: how to silence EDC5129I for function calls

A customer is getting "EDC5129I no such file or directory". The file in
question doesn't exist, but that's okay (it will exist next timeslice), so
the message is annoying.

This would make sense for a command, but it's happening as a side effect of
a function call. I've seen this kind of behavior before and attributed it to
"overly helpful" LE support or some other runtime layer. I seem to recall a
hint of a way to control this but can't find it. Is there a runtime option
to shut this up?

Thanks.

-- R; <><




--
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