The table with the alias a is sid.plus4_zip_summary_us. That table does not have postal_cd, so a reference to a.postal_cd will give that error. However, that table does have full_zip, from which you are getting postal_cd. So you can just reference the substring of full_zip in your join:
proc sql;
create table TEST as
(select b.state_nm as state_c
,a.*
,a.full_zip as ZIP9
,substr(full_zip,1,5) as postal_cd
from sid.plus4_zip_summary_us a
inner join temp b
on b.zip_char_cd=substr(a.full_zip,1,5)
);
quit;
... View more