EVAL FIELDC = %EDITC(FIELDN : ‘X’) <– use appropriate edit code for your purpose
The X edit code ensures a hexadecimal F sign for positive fields and a hexadecimal D sign for negative fields. However, because the system does this, you normally do not have to specify this code. Leading zeros are not suppressed. <b>You can use %EDITC with the X edit code to convert a number to character with leading zeros. However, be aware that negative numbers can produce unexpected results; for example, %EDITC(-00123:’X’) will give the result ’0012L’.</b>
Another method is
Eval FieldC = %Char(FieldN)
In this case leading zeros are suppressed and remember that you can use EVALR to right adjust (Move).
Excellent point Wilson.
You’ve got all the edit codes, edit words, and %Char to use with EVAL and EVALR.