|
Hi Scott,
f) if len > 0, go back to step (d). Keep doing this until len <= 0, that's when you've reached >the end of the data on the pipe.
I did a quick test.The Api should return a document of 21.931 bytes (but it does not return the size and can't know this in advance) then I try to read one block of data at the time as you suggest in d) and f).
------ p_buffer = %alloc(8196); DoU len <= 0; len = read(output(1): p_buffer: 8196); // stream out If (SDR > 0) and len > 0; RC = Write(SDR: p_buffer: len); EndIf; EndDo; dealloc p_buffer; ----The first and second read return len=8196; the 3rd returns 5539 (8196+8196+5539=21931) but It seems that when I reach the end of data the program does not return len = 0 but it hangs on the 4th read instruction.
And if the document is not found the read hangs at first run.
Any suggestion ?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.