This is a mistake in the application that constructs the recode file. Most of the cases coded as 9 should be code 0.
The logic used in CSPro was as follows:
{ ever been tested for AIDS }
if Q916 = 1 | Q922 = 1 | Q926 = 1 then
V781 = 1
elseif Q916 = missing | Q922 = notappl | Q926 = missing then
V781 = missing
else
V781 = 0
endif;
[missing is code 9, and notappl is the equivalent of . in Stata]
in the above code, the test for Q922 should have tested for missing, not notappl.
Fortunately the information from Q922 is also stored elsewhere in the recode file in V840A, and you can correct the case as follows (in Stata):
replace v781 = 0 if v781 == 9 & v840a == . & v840!= 9
replace v781 = 9 if v781 == 0 & v840a == 9