Hello, I'd like to read in a variable and have it change from character to numeric - retaining the same name. The issue I'm facing is when a character value of .U or .N is inputted into numeric - I lose the missing type and all become just dot (.) If this isn't possible I can create new variables and drop the character variables - but if there is any way .... I'm reading in variables as character and applying the format: proc format; invalue chtono 'Y'= 1 'N'= 2 'X'= .N other= .U; Which results in character values of '1', '2', 'N', and 'U'. When I attempt to change these to numbers - I lose the Ns and Us and only have 'generic' missings for them. Regardless of an initial character length of 1 or 2. I change them via: data new(drop=x ); birthdata01 (rename=(&name. =x)); &name.=input(x, 2.); run; Most likely there isn't a way for SAS to translate a character 'U' to a missing numeric value of .U but thought to ask.
... View more