Here's a variation on Tom's program:
data wide;
update have(obs=0 keep=id)
have(keep=id vaccine_1-vaccine_4 vaccine_sequence)
;
by id;
run;
It gives you a wide form to the data, with all the useful information. Its not the form that you asked for, but it does contain everything you might need.
... View more