This is probably a basic question, but I'm having trouble finding an answer when searching previously asked questions. I have a data set with a customer identifier and an employee count, and I'm attempting to create a macro that will assign data data ranges. I don't use macros often, and I'm having trouble creating one to accomplish this issue. I'm attempting to create a low range value, and a high range value, that I can then concatenate into a range. I'm doing this by every 100 employees from 0 to 30,000.
I'd appreciate any help you can provide. FYI, I'm using SAS EG version 6.1.
Data Sample
Customer_number
Employee_Count
1240
4453
1241
279
1242
94
1243
392
1246
79
1248
225
1258
105
1263
80
1265
325
1267
330
1270
365
1272
368
1273
3531
1274
348
1276
193
Macro attempt:
%macro a; %do i=0 %to 30000 by 100; %do x=100 %to 30000 by 100;
data median2; set median1; if pbt_customer_ee > &i and pbt_customer_ee < &x then low_band = &i; if pbt_customer_ee > &i and pbt_customer_ee < &x then high_band = &x;
run;
%end; %end; %mend;
... View more