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



Thank you for the reply.

I ran through debug before but I was only looking at PartNo. I figured out what the
problem is but I don't know how to fix it. I think I caused the problem. I changed the
open statements to point to tmp in the root. When I view the file it's in binary instead
of text. Is it a problem of what the tmp folder's ccsid is?

How could I fix it so I will be able to read text files from tmp?

Thank you,

Gary

I'm in the USA

On 24 Sep 2010 at 10:21, Scott (Scott Klement <rpg400-l@xxxxxxxxxxxx>) commented
about Re: bif' %addr available in v4r4?:

Hi Gary,

This should work just fine on V4R4... The code was written/tested on
V3R2, and later updated for V4R5, where it was re-tested. (The RPG
compiler didn't change between V4R4 and V4R5 -- so that shouldn't be an
issue.)

Besides which... the error (decimal data) doesn't normally indicate a
missing feature. It indicates bad data in the field.

I've run this program on my machine many times, at various releases, and
haven't had the problem you describe. Obviously, there's a bug
somewhere, but I don't know where...

Can you show me how to reproduce the problem? Or can you debug the
program, and determine where the bad data is coming from?



On 9/24/2010 1:29 AM, Gary Kuznitz wrote:
I have a need to read every file in one folder in the IFS from an RPG program.
I found a great example of how to do that at Scott's web site.
www.scottklement.com/rpg/ifs.html
Thank you Scott for sharing the example.

I chose to test out the program CH4Fixed. I am getting a Decimal data error at line
154 in the field PartNo. During a Debug session I see that PartNo was fine with
numbers from 5001 to 5006. PartNo had garbage put into the field at line 153.
callp read(fd: %addr(PartNo): %size(PartNo))

I'm running v4r4. I didn't get any compile errors. Is there something on that line that
won't run in this version of the OS? Has anyone else run into this? Does anyone have
any ideas of why this might not work?

Thank you,

Gary Kuznitz

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