BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

Hi folks;

I'd like to analyze mis-matched rows in the resulting data set, thus, creating indicator variables such as ref, ar, car ...et.c. My code runs fine.  But these indicator variables: ref, ar, car ...et.c  are not found in the resulting dataset temp_alldate_id except 'ho'. What's going wrong here? 

data temp_alldata_id; /*325*/ 
length id1name idname $20;
merge 
m.reference_columns       (in=ref)
Apt_rent_id               (in=ar)          
Car_per_pp_id             (in=car)
Hh_type_id                (in=hh)
N_manufact_id             (in=m)
N_service_comp_id         (in=serv)
N_students_per_class_id   (in=st)
N_welfare_facility_id     (in=w)
Ratio_health_welfare_id   (in=hw)
Urbanicity_id             (in=u)
Workers_per_pp_id         (in=wo)
Disability_id             (in=d)
Gdp_id                    (in=g)
Insured_pop_id            (in=i)
N_employees_id            (in=e)
Retail_workers_id         (in=r)
Vac_rate_id               (in=v); 
by id1name idname; 
ref=ref; ar=ar; car=car; hh=hh; ho=ho; m=m; serv=serv; st=st;
w=w; hw=hw; u=u; wo=wo; d=d; g=g; i=i; e=e; r=r; v=v; 
run;  

 

1 ACCEPTED SOLUTION

Accepted Solutions
ed_sas_member
Meteorite | Level 14

Hi @Cruise 

The issue is due to the fact that you put the same names : ref=ref; etc.

The variable to be created needs to be different : e.g. ref1 = ref.

best,

 

View solution in original post

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi @Cruise 

The issue is due to the fact that you put the same names : ref=ref; etc.

The variable to be created needs to be different : e.g. ref1 = ref.

best,

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 923 views
  • 2 likes
  • 3 in conversation