>I have a 9 digits string, applied the function val () as below
>
>REG = "040111985"
>
>LN = VAL (DIRETO.REG)
> endif
>
>LN = 40111985
>
>I need to keep the 0 on the left side because this
>string will be tested by a rotine that demands 9 digits
If 9 digits are requred that your value is invalid because it has only 8 digits. Addin 0 on the left doesn't make it 9 digits numeric value.
--sb--