Date: Wed, 4 Apr 2001 11:39:44 +0100
Reply-To: Richard.Simhon@CORNHILL.CO.UK
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "(richard Simhon)" <Richard.Simhon@CORNHILL.CO.UK>
Subject: Macro help
Content-Type: text/plain
SAS-lers
Can anyone help with the macro below. When I submit this I get a message in
the log informing me that the IN function is unknown. Can anyone tell me why
this is as in a non macro format the data step works fine!
%macro clean (var3=,data2=,data1=);
%let month=%upcase(&month);
%let year=%upcase(&year);
%let var1=%upcase(&var3);
%local varlists;
%let varlists=%str( YEAR POLST MEMB C_AREA BEDS CLMS_NO P_TYPE PROPAGE
PROPUSE MARRIED DOB INCEPT C_XS B_XS NO_PAYT REF_INS P_TYPE
P_AREA CNCD_ID BNCD_ID SLF_CNT CON_TYP REPAIR UNOC_DY
UNOC_EV UNOC_MT SUBS_VN SUBS_EV CONV JVSI C_CLMS B_CLMS
POL_AGE );
%if %index(&varlists,%str( &var3 )) >0
%then %do;
data aa&&month.&year;
set house.aa&&month.&year;
if &var3 in ("&data1") then &var3=&var3; else
if &var3 in (" ",".") then &var3=" "; else
&var3=&data2;
run;
%end;
%mend clean;
Thanks in advance
Richard Simhon
Business Analyst
Allianz Cornhill
Tel +(44) 01483 552628
**********************************************************************
Copyright in this message and any attachments remains with us. It is
confidential and may be legally privileged. If this message is not
intended for you it must not be read, copied or used by you or
disclosed to anyone else. Please advise the sender immediately if
you have received this message in error.
Although this message and any attachments are believed to be free of
any virus or other defect that might affect any computer system into
which it is received and opened it is the responsibility of the
recipient to ensure that it is virus free and no responsibility
is accepted by Cornhill Insurance PLC for any loss or damage in any
way arising from its use.
Cornhill Insurance Plc, Registered in England number 84638,
Registered Office 32 Cornhill, London EC3V 3LJ.
Regulated by the Personal Investment Authority for life and pensions only.
Member of the General Insurance Standards Council for direct general insurance only.
**********************************************************************