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 (September 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 5 Sep 2008 15:38:01 -0500
Reply-To:     Jamil Ibrahim <jibrahim@ACADAFF.UMSMED.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jamil Ibrahim <jibrahim@ACADAFF.UMSMED.EDU>
Subject:      macro problem
Content-Type: text/plain; charset="US-ASCII"

What is wrong with macro? %let dat=%str(hssu08.dat);

%macro dept; %if %upcase(%substr("&dat",1,2))="HS" %then %do; %let tit=%str(DEPARTMENT OF HEALTH SCIENCES); %end; %else %if %upcase(%substr("&dat",1,2))="HI" %then %do; %let tit=%str(DEPARTMENT OF HEALTH INFORMATION MANAGEMENT); %end; %mend; %dept;

I get this error: NOTE: One or more missing close parentheses have been supplied for the %UPCASE function. ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: %upcase(%substr("&dat",1,2))="HS" ERROR: The macro DEPT will stop executing.

Dr. Jamil Ibrahim, Ph.D. Scientist IV Professor , SHRP Research Supervisor Univ. Of Miss. Med. CTR. 2500 N state St Jackson, MS 39216 Tel. 601-984-1197 Fax 601-984-1205 Nternet: jibrahim@acadaff.umsmed.edu The information contained in the attachment(s) to this email is confidential. If you were not expecting a confidential email from the Department of Institutional Research at the University of Mississippi Medical Center, please do not view, open, disclose, reproduce, distibute or otherwise use this attachment. If you received this email in error, please notify me immediately. Thank you.

Individuals who have received this information in error or are not authorized to receive it must promptly return or dispose of the information and notify the sender. Those individuals are hereby notified that they are strictly prohibited from reviewing, forwarding, printing, copying, distributing or using this information in any way.


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