In code it can be done. Do the following (using an address field as example):
- Generate a new temporary variable using "automatic recode", where the missing values at the old variable will be easily identified. Go to "Transform\Automatic Recode", double click the text variable (address), put a New Name (Addr_Temp) and click "Add New Name". Mark "Treat blank string values as user-missing" box and click Ok.
In code:
AUTORECODE VARIABLES=Address
/INTO Addr_Temp
/BLANK=MISSING
/PRINT.
** Probably, the MISSING will be the last (highest) value, I'm not sure, but it's easy to certify. Now, let's say that this value is 94, what means there are 93 absolutely different valid values for address in your data and the fourth is the blank (imagine a data of where native people was born, in a city with 93 hospitals. There will be 93 different hospital addresses, and some blank for foreign people). Pay attention to special characters, maybe the last code will not be the blank field... Check first the recode list at output window.
- Codify back the missing value as a know and unusual code, like 9999FFFF (or other impossible street address, in our addresses example), as follow:
RECODE Addr_Temp (94='9999FFFF') INTO Address.
EXECUTE.
Unfortunately this will not work in graphics interface, only syntax, at least in my version of SPSS (you can try in yours, just do the normal recode). It didn't accepted an existent variable
Now you have the value "9999FFFF" in the text field, instead of a blank value, and can be used as wished (including a manual recode). Just remember to recode this one to data missing when creating the final variable, or in the "automatic-recoded" one.
Pasteinstead ofOkand saving all syntax you use is likely to save you from a lot of trouble. - RubenGeert