Error compiling RPG400 program

0 pts.
Tags:
Application development
AS/400
RPG
Hi I am trying to compile an RPG program which is using an os/400 file that was created by SQL (JDE Table), the problem i am having is that one field within the table is a "Packed Numeric" Field however it has a length of 31 this causes an error, error reads numeric field is greater than 30 digits. Is there any way around this problem, do i need to use a different RPG?
ASKED: June 29, 2007  12:58 AM
UPDATED: June 29, 2007  8:27 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

If you KNOW, absolutely, for sure, that there will NEVER be a value that needs to be 31 places long, you can create a view over the table that redefines the field as 30 long.

This is dangeous to do, and only works if you can ABSOLUTELY say that due to the nature of the way your business operates, this can **NEVER** occur. (for example, if this is the total field for an order, and you have a price field of 7,2; a quantity field of 2,0; and business logic that says only 10 line-items on an order^, then the total could never be more than 99999.99 * 99 * 10 = 98999990.10 and so the view could define it as small as 10,2 without truncating data.)
____________________________________________________
^ – a book club I know of has this business logic on their website

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following