Any time you get an error, copy the entire procedure or data set code along with all notes, warning and errors from the LOG and then on the forum open a text box using the </> icon and paste the text.
The text box will preserve formatting of any diagnostic characters that SAS includes with many errors.
Since you did not provide a Length for the variable Result and if Result did not exist in the data set this code sets the length of the value to 24 because the first use is assigning the value "Immune due to Vaccination", which means any string longer than that is truncated. If Result already existed in the data set then the characteristics of the existing variable may mean values are truncated even more, or if Result was numeric would result in a bunch of messages about trying to convert character values to numeric and failing.
You can check your data to see if those first combinations appear in the data with the spelling you used by using:
Proc freq data=new.hepbv;
tables HbsAg*Anti_HBS_surface*Anit_hbc_total / list missing;
run;