LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 1 Nov 2006 14:27:24 -0500
Reply-To:   Aknas Dii <aknas_a@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Aknas Dii <aknas_a@YAHOO.COM>
Subject:   Report error - Correction
Content-Type:   text/plain; charset=ISO-8859-1

I am having problem to create the report like the one in below. please see if you can be help on this. -----------------------

The data set looks like this:

Data A; ( 20,000 records)

ID Code Age FullName 33 HYX 55 Dii Jackson 44 VTY 10 Henry Lii 02 HYX 66 Alex Trebek 88 BTY 12 Moo Jackson ;

pname = scan(fullname,1);

proc sort data = a; by pname code; run;

Data B; ( 150,000 Records)

ID Code Age FullName 43 HYX 12 Dii Tom 78 BTY 19 Moo Lii 03 HYX 11 Dii Henry 12 JUK 77 Janet Sandler 17 JUK 77 Janet Sandler ; pname = scan(fullname,1);

proc sort data =b; by pname code; run;

data c; merge a b; by pname code; if (first.code and first.pname) then output c;

run; proc sort data =c; by id; run;

data _null; set c; by Id; __/* first.id then do; */ put@3 id @; put@10 code @; put@15 Age @; put@20 fullname; if (last.code and last.pname) then do;

put/’ Records needs further research ‘/ ; put/’ ‘;

end; return;

Desired result (report looks like) :

Records needs further research

ID Code Age FullName ID Code Age FullName 33 HYX 55 Dii Jackson 43 HYX 12 Dii Tom 03 HYX 11 Dii Henry

===========================================================================

Records needs further research

88 BTY 12 Moo Jackson 78 BTY 19 Moo Lii

Any idea how to achieve the above solution.

Thanks, Dii


Back to: Top of message | Previous page | Main SAS-L page