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

Re: [Ftpapi] HTTP_URL_GET_RAW



Hi Scott,

 

Thanks for that.

 

Do you have an example of this been used and then freeing up the memory?

 

Regards,

 

tonyletterhead2

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Tuesday, May 15, 2018 7:20 AM
To: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Ftpapi] HTTP_URL_GET_RAW

 

Consider using http_xlatedyn() instead.

xlatedyn will automatically allocate memory (which has to be deallocated afterwards) so that it can make sure there's enough space for the string.  For example, a string that's 1000000 bytes in EBCDIC could be as large as (potentially -- though, unlikely) 6000000 bytes in UTF-8.  So xlatedyn() dynamically allocates space as it translates the string to be sure it'll always have enough.  It can be used with strings up to 16mb long, so works great with large data.

Just don't forget to deallocate the pointer it returns.

On 5/14/18 4:12 PM, Tony Cesarios wrote:

Hi,

 

I’m using HTTP_URL_GET_RAW but have an issue if the return data exceeds 32766 in length.

 

So when I try to convert it to EBCDIC using HTTP_XLATE it causes the program to crash out.

 

My question is how can I based on the length coming back I can get all the data.

 

Regards,

Tony

 

 

 



 

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