Error I/E CPF5029 in file tabview1

I don't know why,
in runtime, when I give right keys, my rgple program
gives an error "Error I/E CPF5029 in file tabview1"
in the CHAIN instruction.
Instead if the keys are not in the table so the chain
instruction doesn't break.
In compilation, everything is right.
The table has been created with sql statment CREATE TABLE..
and tabview1 is a DDS LF on this table which gives the right key fields
to the table (4 fields).
KEY           KLIST                          
              kfld                    CDCUSTK
              kfld                    ORDNUMK
              kfld                    ROWK  
              kfld                    STK    
KEY           CHAIN     PR            <======= I/E Error

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
This is a data mapping error.  It means that you have invalid data (probably numeric data) that is being mapped into fields in your view.

Re-create the error, and then display the job log of the job where the error occurred.  Put your curson on the CPF5029 and press F1 to view the extended help text for the CPF5029 error: it explains the problem in detail, including how to figure out which fields are in error.

You'll probably also see CPF5035 or CPD5036 (as explained in the CPF5029 details) that provide more information.

This usually happens when there is bad numeric data that is getting mapped into a numeric field.  For example, there are blanks that are getting mapped into a zoned decimal field, or invalid packed numeric data.

You have a lot of choices.  If it is just a few bad records, perhaps from and old bug, then you may just be able to fix the data one time and be done with it.

Unfortunately, sometimes that's not possible, so you may need to code your program to either handle the error, or provide an alternate view that maps the data into a character field - then your program can test to see if ti contains valid numeric data (TESTN) and convert it or fix it, or ignore it, or whatever is appropriate.

There are also some compile options that allow your program to ignore invalid decimal or zoned data.  These can be dangerous, so use them with care.

- Gary Patterson

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobdylan75Author Commented:
Ok you are in right,
it says that 3 fields have incorrect data but this 3 fields have a null value at the moment,
it is not possible to enabled null value as good?
Gary PattersonVP Technology / Senior Consultant Commented:
Null value support is a little tricky.  When you create a DB2 field that can contain null values, the system creates a null value flag for that field that must always be checked first to determine if the associated data field.  SQL knows about null indicators, and automatically uses them.

RPG IV provides good null support, but you have to take some specific steps, including properly setting the ALWNULL compile option.

Here's a good article that discusses null handling in RPG:

- Gary Patterson

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.