Date: Tue, 3 Jul 2001 15:22:03 -0400
Reply-To: Crystal Vierhout <vierhout@UNITY.NCSU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Crystal Vierhout <vierhout@UNITY.NCSU.EDU>
Subject: Index with a key read
Thanks for everyone help on the key label question. After I tried the code of Mike Zdeb which worked great.
set group(keep=herdcode string);
set nowrite.history1 key=herd / unique;
when (%sysrc(_sok)) output;
when (%sysrc(_dsenom)) _error_ = 0;
otherwise do; put "UNEXPECTED ERROR"; stop; end;
BUT I think I may have set this up wrong initally. Below is what I need the code to do but I need something different that is going to run a lot faster than a merge for our web program. I thought first an index key read but that seems to only get me one observation. What the most efficient way to get the same result of the below code but in half the time?
merge group(keep=herdcode string) nowrite.history1 (in=a);
by herdcode string; if a;
Dairy Records Management Systems