04-20-2018 05:25 PM
What is the name of your source data set?
What is to be the name of the resulting data set?
How do we know which information (records to extract, records with values of ??? for City)?
What does the result look like?
What will you do with the multiple data sets after extraction?
Many times there may be absolutely no need to extract data at all and usually extracting into multiple data sets based on the value of one or more variables may cause more work than a different approach.
SAS has a feature called "By Group processing" which means you can make a separate report by the value of one or more variables such as BY CITY from a large data set. You can restrict the data to a reduced set of records with a WHERE statement such as: Where city in ('New York' 'Chicago' 'Memphis') to process data only from those cities.
BTW be careful with variables like City as many cities have more than one when state (or province or other sub-region) is considered. Springfield for example is in 24 states or protectorates.