Hi Aaron,

Isn't the 1024th byte 90?


Paul Tuohy
www.comconadvisor.com www.systemideveloper.com

Aaron Bartell wrote:
I have an IFS file reading issue that I can't quite figure out. The
general idea is that I want to incorporate a process of streaming an IFS
file from one place to the next in chunks of 1024 vs. reading it with a
single call to read() after first allocating space based on the file size.

The scenario is as follows: I have a file named small.jpg in the IFS that
is 1067 bytes in size. When I read in 1024 bytes the 1024th byte is
different than when I read in all 1067 bytes at a time. The 1024th byte
when I read 1024 at a time is x'AF' (which appears as the Registered
symbol) and the 1024th byte when I read in the entire file of 1067 bytes
is x'94' (a lower case letter m). Crazy eh?

Here are some screen shots of the memory differences (highlighted) in
WDSC's Memory view:

Here is the concise program I put together to test the issue:

Here is the small.jpg file I am using in the test.

Anybody have any ideas of what might be going on? Am I missing something

Aaron Bartell


Visible links
1. http://mowyourlawn.com/temp/readbyteissue_dataptr1.png
2. http://mowyourlawn.com/temp/readbyteissue_dataptr2.png
3. http://mowyourlawn.com/temp/READBYTE.RPGLE
4. http://mowyourlawn.com/temp/small.jpg
5. http://mowyourlawn.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2021 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.