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 (October 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Oct 2006 09:42:22 -0200
Reply-To:     Renata Matos <renata_matos@YAHOO.COM.BR>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Renata Matos <renata_matos@YAHOO.COM.BR>
Subject:      Re: Macro + Surveyselect
Comments: cc: jim2stat@YAHOO.CO.UK, davidlcassell@MSN.COM
Content-Type: text/plain; charset="iso-8859-1"

Thank you for de messages, Jim Groeneveld and David L. Cassell.

I'll explain what I'm trying to do. There are many steps and in the first one I have to take J samples of a data that may vary. J ranges from ll=0.1(n/k) to lu=0.5(n/k). n varies according to the data and k is defined by the user. I don't know if it's Ok but I put J=mean(ll,lu)+1. That's not the problem. I can fix this latter. I agree with David and I think that IML is not necessary here. I did this using data _null_ and call symput and worked well. But now I've some other questions:

- I did a macro to discover the number of objects in the data but I think it's stupid. I don't know. Any suggestions?

- The dataset nobs has the number of objects. And part of the code is:

data _null_;

set nobs;

call symput('n',nobs);

run;

data _null_;

ji=0.1*(&n/&k);

js=0.5*(&n/&k);

aux=int((ji+js)/2)+1;

call symput('quantidade',aux);

run;

Why I can't put this two data _null_ together? Like this:

data _null_;

set nobs;

call symput('n',nobs);

ji=0.1*(&n/&k);

js=0.5*(&n/&k);

aux=int((ji+js)/2)+1;

call symput('quantidade',aux);

run;

I don't know why but it doesn't work...

Regards,

Renata Matos


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