Hi Don,

I could certainly add error checking to this -- but, I never expected people to use the debug file in production environments. The idea of the debug file was to be able to generate diagnostics to send to me when people are having problems.   You see, it was a very common dilemma that something would not work, and the programmer would have no clue what information to give me or how to get that information, so I created the debug file to output lots of diagnostics for them to send to me.

So it was really only intended as something used by developers who were writing/testing their programs to send to me.  It was not intended to be something people using on an ongoing basis.  As such, I didn't take error handling, et al, seriously.

You mention that the file is growing and not being replaced -- but, please understand that the only thing that triggers it to be replaced is when the caller calls http_debug().   So, if the caller has previously called http_debug() to enable debugging, it would be cleared -- but after that, they can do any number of requests (millions if needed) without the file being cleared again -- unless they called http_debug() again, it would simply keep appending.

So its hard to say from your post whether anything is actually malfunctioning?

If indeed they are calling http_debug() to try to replace the file, then all I can suggest is that I add more error checking so we can see why it's not clearing/deleting the file.


On 11/30/2019 7:16 PM, Don Brown via MIDRANGE-L wrote:
I am using HTTPAPI on V7R3.

I have debugging turned on.

I have found a debug file that is large.

The code suggests the file should be unlinked when the procedure is

The debug file is in /tmp/httpapi_debug.txt and *public has *rwx authority

The http_debug procedure does the following;

callp http_dclose <== This closes the stream file using
the extproc(close)
if peStatus = *ON <== Debugging is ON
callp unlink(HTTP_DEBUG_FILE)

The result of unlink is not being checked - would this be logged to the
job log ?

How can I determine why the stream file is growing rather than being
recreated on each call to httpapi ?
Thank you for any suggestions

This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.