× 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.



Also, are you sure that you completed the sending of each record before
trying the next?

send will return the number of bytes that were successfully sent, which
could be less than the number of bytes you requested it to send.  If the
number sent is less than the number requested, then you need to issue
the send again, sending the missed portion.  recv works similarly.

Regards,
Rich

On Mon, 2004-01-26 at 12:42, GKern@xxxxxxxxxxxxxxxx wrote:
> I'm experiencing a problem while sending data through a socket and am not 
> sure how to proceed to correct it.
> 
> I have a physical file, from which I read at least 2 but not more than 8 
> records to construct a data structure that is to be sent through the 
> socket.
> 
> The data structure (socket data variable) is constructed similar to the 
> example that follows:
> 
> A hex code start_block of    x'OB', 
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by a record from the physical file (translated to ascii), 
> followed by a carriage return x'0D'
> followed by end_block   x'1C'
> followed by a carriage return x'0D' 
>  
> The only data translated to ascii is the data from the physical file. 
> 
> For some reason, when I send the variable containing this string the 
> start_block x'0B' appears to be received by the server twice. My program 
> only refers to this field once to define the constant, and once to insert 
> it at the beginning of the variable being sent.
> 
> The data in the phsical file is correctly formatted in every record so I 
> know the problem isn't in the physical file.
> 
> Funny thing is, it doesn't happen every time and that's why I'm stumped. 
> Out of 2350 sends, 26 exhibit this problem. I tried the send a couple of 
> times and it's the same ones that generate this problem. That leads me to 
> conclude the bug is in my program, I've viewed the data in debug mode, and 
> it has the same start_Block, data, end_block, carriage return 
> characteristics in both acceptable and rejected variables just before it's 
> sent.
> 
> Anyone with any ideas for what to do next?
> 
> Regards,
> 
> Gerald Kern
> IBM Certified AS/400 RPG IV Developer & RPG IV Programmer
> MIS Project Leader, Lotus Notes/Domino Administrator
> The Toledo Clinic, Inc.
> 4235 Secor Road
> Toledo, OH 43623-4299
> Phone 419-479-5535
> gkern@xxxxxxxxxxxxxxxx
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.