Date: Fri, 16 Jan 2004 09:53:49 -0800
Reply-To: Jeff Voeller <c-jeff.voeller@MCI.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jeff Voeller <c-jeff.voeller@MCI.COM>
Subject: Re: One simple question about macro
Content-type: text/plain; charset=us-ascii
Try using double quotes in your filename statement:
filename mcppor "F:\MCP\SPSS_Portable files\Med&yr..por";
SAS won't evaluate macro variables enclosed in single quotes.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nan Li
Sent: Friday, January 16, 2004 9:51 AM
Subject: One simple question about macro
I'm a SPSS user and switch to SAS for just couple of weeks. I have a
question about macro, and would like to seek for your help. The question is
as the following:
I'm trying to convert 5 SPSS portable files (from med1996.por to med2000.por
) to SAS files (from Medical1996 to Medical2000), when I run the following
very simple macro, I got some error message in log. But, if I don't use
macro variable in fileref, everything seems fine. I couldn't figure out why.
Could you please give me some help about this? Any input would be highly
In addition, I just register in digest list, could you please reply to my
email address? Thanks in advance!
****** Macro ******
libname medsas 'F:\SAS_NDSS files';
%* Convert portable SPSS MCP data to SAS files;
%* Keep variables: pin, dat_serv, famtpd, provnum, specode, diag, feecode,
filename mcppor 'F:\MCP\SPSS_Portable files\Med&yr..por';
proc convert spss=mcppor out=medsas.Medical&yr.(keep=pin dat_serv famtpd
provnum specode diag
feecode hosp where=(famtpd>0 and
(pin<>'0' or pin<>' ')));
*** Part of Log ***
ERROR: Physical file does not exist, F:\MCP\SPSS_Portable files\Med&yr..por.
NOTE: The data set MEDSAS.MEDICAL1997 has 0 observations and 0 variables.
WARNING: Data set MEDSAS.MEDICAL1997 was not replaced because new file is
NOTE: PROCEDURE CONVERT used:
real time 0.06 seconds
cpu time 0.03 seconds
ERROR: There is not a default input data set (_LAST_ is _NULL_).
NOTE: Statements not processed because of errors noted above.