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



Here is the situation - explained further.....  We have a piece of
hardware that reads data from wire looms on the factory floor.  The
hardware is monitored by another piece of hardware.  The second piece of
hardware allows us to connect using a UDP socket program to port 1658.  

We have an RPG program that connects to port 1658 using the UDP protocol
(UDPSERVER - thanks Scott for the excellent example).  We are receiving
the data, but it is in binary format.  Each byte of data must be
converted to character data in the end.  These characters then must be
interpreted in a specific manner.

When we receive the data in the RPG program, the first character of the
buffer is visible, but the remainder is not interpreted.  You can see
that there is data there, but it is displayed as blocks.

Any thoughts?

Thanks 

Mike

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, February 01, 2005 7:44 PM
To: RPG programming on the AS400 / iSeries
Cc: Christopher Peel
Subject: Re: Working with binary files storing text data


Hi Mike,

A few things about your message that I'm unclear on:

a) How are you transferring the data? TFTP? NFS? RealAudio? (All of
these 
are file sharing protocols that use UDP to move the data across the 
network.)

b) How are you saving the data to the IFS?  Did you write a program that

does this?  How does it work?  What part of the IFS are you referring
to?

c) How are you trying to open the file in the IFS?  In an RPG program? 
What API does it call?  What parameters do you pass to the API?

d) What happens when it fails?  Do you get an error message?  Do you get

data that you didn't expect?

I can't even begin to offer you code samples since I don't understand
what 
you're trying to do.



On Tue, 1 Feb 2005, Mike Silvers wrote:
>
> We have a problem.....  We are receiving a binary file storing text
data
> using the UDP protocol.  We can receive the file and save it on the
IFS.
> We can not read the data in the file.  Does anyone have any ideas...
or
> better yet... does anyone have any code samples?
>
-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.





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.