× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Good morning everyone,

I've been attempting to create a socket connection to a report vendor
using Scott Klement's (hi Scott) tutorial on that subject. I've managed
to successfully establish the socket connection AND send the request
records downstream but the segment of the program that accepts the
response doesn't work as I anticipated which leads me to believe I'm not
getting the concept very well.

What I need to do is accept a number of records into the buffer until I
get an END TRANSMISSION record. Each record will be the same length and
is identified internally. So, I'll grab one record, decide what type it
is and process it then read the next record from the buffer. I'm also
supposed to put a 60 second time out on this segment of code but we'll
blow up that bridge later.

The logic is:

DOU LastRecord = *On;
rc = rdline(sock: %addr(recbuf): %size(recbuf): *On);
if rc < 0;
err = errno;
callp close(sock);
callp die('rdline(): ' + %str(strerror(err)));
return;
endif;

TestRecord = recbuf; // This moves what's in the buffer into a
DS that can locate the
// record type field.
// Process record.

ENDDO;

What happens is the system works for a while on the rc=rdline... Line
then returns -1 for rc and the errno variable comes back with an error
when I attempt to eval it in debug. (A type error).

Does anyone have any idea what I'm doing wrong or what I'm missing?

Thank you,
Chris Anderson
Partners Mutual Insurance

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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

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.