60 pts.
 Error in position while printing variable
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
ASKED: February 26, 2013  6:00 AM
UPDATED: February 26, 2013  12:53 PM
  Help
 Approved Answer - Chosen by fsddfsdfsd (Question Asker)

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. 
ANSWERED:  Feb 26, 2013  12:34 AM (GMT)  by fsddfsdfsd

 
Other Answers:

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.

Last Wiki Answer Submitted:  February 26, 2013  12:53 pm  by  fsddfsdfsd   60 pts.
Latest Answer Wiki Contributors:  Michael Tidmarsh   11,390 pts. , fsddfsdfsd   60 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 108,025 pts.