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 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 17 Nov 2005 20:24:22 -0500
Reply-To:   "Droogendyk, Harry" <harry.droogendyk@RBC.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Droogendyk, Harry" <harry.droogendyk@RBC.COM>
Subject:   Re: %upcase(&aedata.) and ae_&aedata. ?
Content-Type:   text/plain; charset="iso-8859-1"

Turn on some options and run your code. eg. options mprint symbolgen mlogic;

mprint - text ( in this case SAS code ) generated by the macro is dumped into log symbolgen - as macro variables are resolved, their values are dumped into log mlogic - decisioning resolution appears in log

To turn off these options preface them with 'no', eg. options nomprint;

Ending a macro variable reference with a period is a good habit to get into as it can remove confusion. Often it's necessary, eg. &prefix._rest. Without the period SAS would attempt to resolve a macro variable called &prefix_rest rather than one called &prefix. In the case of the code displayed the periods are not necessary.

data=ae_&aedataL The macro is being invoked with a single positional parm with a value of AE. The macro definition gives you the name of that positional parm, &aedata. Wherever you see &aedata ( or &aedata. ) in the macro code, the value AE will be substituted. In the case of the sort, the incoming dataset name will be ae_AE.

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu]On Behalf Of Somebody help me Sent: Thursday, November 17, 2005 8:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: %upcase(&aedata.) and ae_&aedata. ?

I am trying to understand a program is done by someone who is not around. So Please refer to the following codes( a part of the program):

%macro checkae(aedata); %if %upcase(&aedata.)=AE %then %do; PROC SORT data=adverse(keep=patient atstop) out=ae; by patient; run; %end; %else %do; PROC SORT data=ae_&aedata.(keep=patient atstop) out=ae; by patient ; run; %end;

%mend checkae; %checkae(AE);

Can you please explain %upcase(&aedata.) and ae_&aedata. here? I understand what %upcase does but not getting why there is '.'after the macro variable ? again what exactly it means by ' ae_&aedata ' in the line PROC SORT data=ae_&aedata.(keep=patient atstop) out=ae;? _______________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.


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