@arunrami wrote:
HI All,
Here is my scenario - I am using proc import , which will set the datatype based on its content , hence I have taken a copy of dataset using 'set' and tried to convert the datatype using only if it satisfies my 'if logic', but it seems still goes in to the if condition even though it doesn't satisfy my condition .
Reliance on Proc import, especially if reading data sources that are text such as CSV, is a poor practice. If you know you are going be reading same structured data, which is sort of implied by fixing specific named variables, then better is to read them correctly in the first place using a data step. Then you control the value types at the beginning.
... View more