I have a data set which has a few variables. One variable is called sex, which has a fixed length of 1, and formatted as $1. (i.e. M, or Female). This variable also has missing values. Now the question is to set the missing values as 'Other'. The following is what I did:
LENGTH sex $5.;
FORMAT sex $5.;
IF age=' ' THEN age='Other';
Unfortunately, the missing values are set to be 'O'. How can I correct this without using any new variable names?