i want solution on rpg programming , . decimal data error raised during running program

in a pf having 500 records,i am updating all 500 records,on going at 250 record i am getting decimal data error,,with out cancel the program how could the problem ,,the program is in msgwait,,wt is the way of approach and resolve the issue
rajiv chowdaryAsked:
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.

daveslaterCommented:
locate the job using wrkactjob
option 5 then option 14 to see the open files
see the RRN of the record
use dfu to look at the record and try to fix the data

or compile the program with
 H FIXNBR(*ZONED :*INPUTPACKED)  

Dave
0

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
tliottaCommented:
Impossible to be sure without more info. The suggestion of WRKACTJOB from @daveslater is as good as it gets unless we know more. (The FIXNBR() suggestion might be a problem and needs more info.)

Is this a regular failing of the program, or is it a one-time error that is waiting on a response? Was the program compiled to include debug data? If the program is terminated, can it safely be run again after any data problems are solved?

For now, we don't know the source of the data problem. Maybe a parameter mismatch corrupted a variable in memory. Maybe RR 250 has bad field data. Maybe some other input has bad data. Answering the message with 'D'ump is likely to give you the most info right now,

If you terminate the program and run it again, there are debug possibilities that might be useful. It's not really possible just to jump into a running program without preparing before a program starts. (That would open serious security problems.)
0
MurpheyApplication ConsultantCommented:
Hi  rajiv,

AFAIK, it can only occur if you try to move a character to a numeric value, so I sugest don't use the MOVE statement, but always use EVAL.
You cant assign character to numeric with EVAL (Compiler will not accept it) so you need to use the %DEC() BIF

e.g.
MOVE  FieldC  FieldN
will be:
Eval FieldN = %dec(FieldC:9:2)

To be sure that field1 contains a valid number use:

If   %Check( '0123456789' : FieldC ) = 0
Eval FieldN = %dec(FieldC:9:2)
EndIf

Regards,
0
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
IBM System i

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.