I have no clue with rpg and I am trying to convert some data. So please be kind.
I am trying to convert a character value into a packed decimal using rpg ile.
Here is what I was thinking, pass in a value like ('0555.000') into the procedure. Pack the data and return the packed decimal representation. The code I am using :
I may be way off base here, just looking for some direction. I will be calling compiling this as a service program and using a sql rpg ile function to call this.
Thanks,
Greg
I am trying to convert a character value into a packed decimal using rpg ile.
Here is what I was thinking, pass in a value like ('0555.000') into the procedure. Pack the data and return the packed decimal representation. The code I am using :
Code:
HNOMAIN
DPD73 PR 7p 3
DCHARIN 8 CONST
PPD73 B EXPORT
D PI 7p 3
DCHARIN 8 CONST
DCHAROUT DS 4
DDECOUT 7P 3
C EVAL CHAROUT = CHARIN
C RETURN DECOUT
P E
Thanks,
Greg