While using this code %macro SPLIT (DATA = , VAR 😃 ; PROC SORT DATA = &DATA (KEEP = &VAR) OUT = SORT_&VAR NODUPKEY; BY &VAR; DATA _NULL_; SET SORT_&VAR end = final; CALL SYMPUTX ("&VAR"!!left(_n_), &VAR); if final then call symputx('Count',_n_); %do i = 1 %to &count; data &&&VAR&i; set &DATA; where &VAR = "&&&VAR&i"; run; proc print data = &&&VAR&I; title "Customer Data for &VAR: &&&VAR&I "; %end; %mend SPLIT; %SPLIT (DATA = ORION.EMPLOYEE_PAYROLL, VAR = EMPLOYEE_GENDER) I am getting error that Employee_gender1 was not resolved, cant understand why because EMPLOYEE_GENDER2 was resolved to Male; and its clearly visible in datafile sort_EMPLOYEE_GENDER that variable employee_gender has only two values - Female and Male.
... View more