[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] [External]Re: Timeout parm and log file for HTPAPI



Hi Scott,

 

Also, do you think except for new functionality added over the years, HTTPAPI utility may have gotten any better in terms of efficiency on response time for url post or get?

 

And, how debug file can be added with any custom info. that we need to add to make it more usable? Any way of doing it without needing to do much development and throwing with a command something like order number into debug file.

 

I think, that’s too many questions to answer. From my previous post and this post.

 

Thanks in advance for all the help in this regards.

 

Best Regards

Farhan

 

From: Farhan Qadri
Sent: Monday, March 1, 2021 11:25 AM
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: [External]Re: [Ftpapi] Timeout parm and log file for HTPAPI

 

Hi Scott,

 

In looking at the HTTPAPI version it seems that it was installed in 2007 (ver 1.21) on our box. When I turned the debug (*ON) right before the http_url_post it seems to keep the last order info. and always overwrites a new version. Is this something that we can change to always append details and not to overwrite.

 

Also, I tried to use the following but program couldn’t file any copybook for it in the old version to be compiled fine. Is this command also introduced in the later parts of the updates to httpapi.

 

http_setOption('debug-level':'2');               //This will have timestamp on each trace

 

I can see the install was done in a different library created at the time and not the standard library as provided and used to bind program using that library. Is there a way that I can install a latest version of the HTTPAPI in yet another library on the same box and use it as test to bind for my test and leaving the production intact to the old library?

 

As I said, I am new to this whole project and may need help to get to some level of expertise. I am also going through the ftpapi mailing lists for many old questions to find answers on my own but may require special questions like above answered to proceed.

 

Thanks and Best Regards

Farhan

 

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Friday, February 26, 2021 4:40 AM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: [External]Re: [Ftpapi] Timeout parm and log file for HTPAPI

 

Hello Farhan,

 

Q: What if we need to change to 1sec to have no delay on a batch job which seems to be taking much time integrating the orders from external source using HTTPAPI. Would that do any damage or exceptions?

A: If you change the timeout to 1 second, and there is a lag in the network where you do not connect or receive data for 1 second, HTTPAPI will set the RC of http_url_post to 0.   Whether that does "damage" or raises exceptions will depend on how your program treats that rc=0 response. 

If the network/server can return the document without a 1 second delay in receipt, then it will make no difference at all. 

It also will not make a large document receive quicker.  For example, if it takes you 2 minutes to download a 20 megabyte file, it'll still take 2 minutes even if you give it a 1 second timeout.  It will not stop after 1 second unless there is lag preventing it from receiving anything.

 

Q: Where and how do we get the logs on HTTPAPI to see all info. Is it somewhere in an IFS folder or needs to be turned on somehow before getting any logs for it.

You can call the http_debug() procedure to tell HTTPAPI to produce a full trace.  For example:

http_debug(*ON: '/tmp/my_lovely_file.txt');

Where the log is placed depends on what you pass for the 2nd parameter.  If you do not provide the second parameter, it will use a default name of /tmp/httpapi_debug.txt in your IFS.

-- 
Scott Klement
sk@xxxxxxxxxxxxxxxx
 

On 2/25/2021 6:29 AM, Farhan Qadri wrote:

Hi,

 

A bit new to HTTPAPI and trying to maintain a code inherited.

 

I have a program which sends a data out to a URL to get the answer back as XML as follows:

 

EVAL      rc=http_url_post(%trim(pRqUrl1)

               : p_data: st_size:       

                %trim(pAnswer):30)      

 

Last December , I put the :30 at the end of the statement just to bring the timeout value from default 60 to 30 second. As per my understanding, this timeout only work if the response on the post takes some time for a response back and hence could wait till 30 seconds now. What if we need to change to 1sec to have no delay on a batch job which seems to be taking much time integrating the orders from external source using HTTPAPI. Would that do any damage or exceptions?

 

Second question is regarding logs for the HTTPAPI. Where and how do we get the logs on HTTPAPI to see all info. Is it somewhere in an IFS folder or needs to be turned on somehow before getting any logs for it.

 

Some urgent insight would be appreciated.

 

Thanks

Farhan



The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi