Error in position while printing variable

60 pts.
Tags:
AS/400
AS/400 Printer File
I have a variable xyz as7P 2.This variable is defined in a file. I am using this in my program to be populated on printed on report defined in O spec. Problem is - I am just using edit code 'L' and mentioned ending position as 71. but when printed or spooled, it's being generated with an ending position of 70. I don't know why?

Software/Hardware used:
RPG,as400

Answer Wiki

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

Got the answer.It is due to memory management of Packed decimal,it is being printing at 70 and not 71.We can use ‘.’ to adjust the correct position.

Thanks Tom.

Discuss This Question: 2  Replies

 
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
  • TomLiotta
    Show us the coding, then include an example of the ending position. It's hard to determine what problem might exist without being able to see it. At the moment, it seems as if it's correct. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    70.01- the - would be in 71
    
      70.01  the 1 would be in position 70 
    position 71 is reserved for the sign 
    which isn't expressed when the value is positive. 
    50,860 pointsBadges:
    report

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