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,

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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