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

I ran your code in debug in a green screen and did EVAL gdataptr1 :x 1024. The area of memory you are seeing as different appears to be past 1024...

Up to 1024, the data appears to be identical.

gdaptr1

00370 FDEBD928 AE3C6606 9E320A15 6F65AE87
00380 660F1D53 07273A76 BBD353C3 FE1CAF86
00390 62D6350B BF15E5A5 B2864992 DA509E5C
003A0 8CBD53E6 61BDCE78 4C60E0F3 57278F47
003B0 B0F8B967 1F852E0C B6ED7281 FCB6568B
003C0 0C01608C A4EE5C13 C1C60822 BAEF167C
003D0 3BD375BB E7BE82E5 EC6E2439 90AA0756
003E0 3EB8C8E7 F1AB7E0D F0369BE1 C9CDD895
003F0 EEEEC8C0 95D42851 EC3B57CA 51C93170

gdaptr2

00370 FDEBD928 AE3C6606 9E320A15 6F65AE87
00380 660F1D53 07273A76 BBD353C3 FE1CAF86
00390 62D6350B BF15E5A5 B2864992 DA509E5C
003A0 8CBD53E6 61BDCE78 4C60E0F3 57278F47
003B0 B0F8B967 1F852E0C B6ED7281 FCB6568B
003C0 0C01608C A4EE5C13 C1C60822 BAEF167C
003D0 3BD375BB E7BE82E5 EC6E2439 90AA0756
003E0 3EB8C8E7 F1AB7E0D F0369BE1 C9CDD895
003F0 EEEEC8C0 95D42851 EC3B57CA 51C93170

Crispin.


----- Original Message ----- From: "Aaron Bartell" <aaronbartell@xxxxxxxxx>
To: <RPG400-L@xxxxxxxxxxxx>
Sent: Thursday, July 02, 2009 11:43 AM
Subject: Odd IFS reading issue


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

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.