Per the documentation, it looks like the ZIPCITYDISTANCE function works for recognized ZIP codes in the United States. Many of those you provided (or made up?) are not in the U.S. The SASHELP.ZIPCODE dataset contains which ZIP codes are valid:
proc contents data=sashelp.zipcode;
run;
So make sure those that you're using are valid.
Here is an example that works, using ZIPCITYDISTANCE(), for valid U.S. zip codes:
data have;
input HQ_ZIP AFF_ZIP;
datalines;
10001 90001
98101 32789
;
run;
data want;
set have;
distance = zipcitydistance(HQ_ZIP, AFF_ZIP);
run;
... View more