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



Aaron,

Isn't the part you're highlighting in your screen caps the bytes 1025-1029?

Since 1024 is evenly divisible by 16, I'd expect the 1024th byte to be
the last byte of the row above.

Charles

On Thu, Jul 2, 2009 at 11:43 AM, Aaron Bartell<aaronbartell@xxxxxxxxx> 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:
  [1]http://mowyourlawn.com/temp/readbyteissue_dataptr1.png
  [2]http://mowyourlawn.com/temp/readbyteissue_dataptr2.png

  Here is the concise program I put together to test the issue:
  [3]http://mowyourlawn.com/temp/READBYTE.RPGLE

  Here is the small.jpg file I am using in the test.
  [4]http://mowyourlawn.com/temp/small.jpg

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

  Aaron Bartell
  [5]http://mowyourlawn.com

References

  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/
--
This is the RPG programming on the IBM i / System i (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:
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.