Date: Fri, 16 Jan 2004 10:00:04 -0800
Reply-To: "Terjeson, Mark" <TERJEM@DSHS.WA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <TERJEM@DSHS.WA.GOV>
Subject: Re: One simple question about macro
Content-Type: text/plain; charset=us-ascii
Macro items will get resolved when in a
double-quoted string. They will not get
resolved in a single-quoted string. This
allows you to have macro stuff resolve in
and still be able to have literal strings
inside single quotes such as 'mo&yr'.
Hope this is helpful,
Reporting, Analysis, and Procurement Section
Information Services Division
Department of Social and Health Services
State of Washington
From: Nan Li [mailto:nanl@NLCHI.NF.CA]
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.