proc import datafile ="C:\Users\Anand\Desktop\covid19 updated_onMar31-2020.xlsx"
out=covid19
dbms=xlsx;
run;
data covid19a;
set covid19;
where Reporting_Country_Territory_Area in ('Western Pacific Region', 'South-East Asia Region');
run;
proc print data=covid19a;
run;
This code will: Import the data: Reads the Excel file covid19 updated_onMar31-2020.xlsx from the specified path. Creates a SAS dataset named covid19 from the imported data. Filter the data: Creates a new dataset covid19a containing only the rows where the region Reporting_Country_Territory_Area is either 'Western Pacific Region' or 'South-East Asia Region.'. Print the filtered data: Displays the contents of the covid19a dataset. This refined code addresses the issue in the original code by correctly specifying the where clause to filter for the two desired regions.
... View more