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
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.