data split_obs;
input name $ city$ ;
datalines;
A mumbai
B chennai
C pune
D chennai
F mumbai
;
run;
i want split observations as single dataset with name
like A dataset with name and city
So you want 5 separate data sets from this 1 data set? Also, what if more than one observation had the same name? And same Name and City? Like below
data split_obs;
input name $ city$ ;
datalines;
A mumbai
A mumbai
A pune
B chennai
C pune
D chennai
F mumbai
;
run;
I want those observations separated with single observation with cityname of the dataset
ex data_mumbai contains Name City
A mumbai
like that
Why? Having data as single lines in many data sets makes your programming harder.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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 save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.