Return to the RPG Tips
Code to move left justified alpha to numeric
I'm not sure if the following code is any better than what you are doing, but I think it does what you want it to do. When finished num = 000001234567
D char S 12A INZ('1234567 ') D varchar S 12A INZ('000000000000') VARYING D num S 12S 0 C EVAL varchar = %TRIM(char) C MOVE varchar num Hope this helps Adam Ray
[report a broken link by clicking here]