Hi,
In addition to other comments, it's also hard to imagine why you want #1 (a separate data set for every country) when you can achieve #2 with a simple PROC PRINT and BY group processing. Assuming the file is sorted by country, then you can simply use BY statements with NEWFILE=BYGROUP (in HTML, RTF or PDF and some few other destinations. You'd need PAGEBY in the LISTING destination to get every country on a separate page).
The reason I found your post confusing was that if ALL you wanted was a separate dataset for every country so you could do a PROC PRINT, there would be no need for tracking first.byvar or last.byvar unless you needed to ALSO reset some counter variable or accumulator variable for each country OR you wanted to only output 1 observation per country. So, that piece of your post just did not make sense to me.
cynthia
[pre]
ods listing;
ods html file='c:\temp\county1.html' style=sasweb
newfile=bygroup;
title 'New Proc Print for Every ByGroup';
proc print data=countynm1;
by country;
pageby country;
var country reading;
sum reading;
run;
ods html close;
[/pre]