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 (December 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 28 Dec 2006 08:46:43 -0500
Reply-To:     Ken Borowiak <EvilPettingZoo97@AOL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ken Borowiak <EvilPettingZoo97@AOL.COM>
Subject:      Re: proc report------ is it possible to use two dataset

On Thu, 28 Dec 2006 05:03:42 -0800, lavanya <lavenskey@GMAIL.COM> wrote:

>hi all, > >Am working with a data model.......... and to print records using proc >report!!!! > >Bt am not sure, as , is it possible to use two dataset name in a single >proc report statement. >the model has a field common to both the dataset... and reports are to >be generated by combining these two fields > >Example: proc report data = test1 test2 nowindows; >where test1 and test2 are the two different dataset > > >Many thanks in advance, >Lavanya

Lavanya,

I don't believe you can use more than one data set in PROC REPORT. You could join the tables as a view, then reference the single view in PROC REPORT.

But your question did get me thinking .... since PROC REPORT is capable of doing DATA step-like operations (arrays, conditional logic, etc.), I wondered if the V9 Hash object is available in PROC REPORT. Consider the following:

data dob ; infile datalines missover ; input name : $8. dob : date7. ; format dob date7. ; datalines; Jane 01Jan60 Janet 28Dec06 Ronald 25May04 ; run ;

proc report data=Sashelp.Class nowd ; column name weight dob ; define dob / computed ;

compute before _page_ ; dcl hash report(hashexp:5, dataset:'dob') ; report.definekey('name') ; report.definedata('weight') ; report.definedone() ; endcomp ;

compute dob ; if report.find() then call missing (dob) ; endcomp ;

run ;

Did this work? (.... drum roll, please ....)

Nay!

HTH, Ken


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