Converting from numeric to character in SAS

morinia
morinia used Ask the Experts™
on
Experts,

I have an issue with fielda defined as numeric 8. I need to convert to character. The problem is there are non- numeric leading characters so when I just move to a defined alpha field I have unreadable characters in front and the character field is not left justified.  

Does anyone know how I can code this to get the fondly move the numeric data.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
senior developer
Top Expert 2005
Commented:
What are you doing currently, something like this?

char_value = put(num_value, 10.);
moriniaAdvanced Analytics Analyst

Author

Commented:
Yes
could you provide examples of the data that you have, the leading non numeric characters?

and just to check: you are sure the new field is a character field?
moriniaAdvanced Analytics Analyst

Author

Commented:
This worked when I used a data step.  SAS did not like me doing it in one  step in Proc Sql.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial