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 (April 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 4 Apr 2001 07:15:28 -0500
Reply-To:     "Workman, Rob" <Rob.Workman@SULZERCARBOMEDICS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Workman, Rob" <Rob.Workman@SULZERCARBOMEDICS.COM>
Subject:      Re: Macro help
Comments: To: "Richard.Simhon@CORNHILL.CO.UK" <Richard.Simhon@CORNHILL.CO.UK>
Content-Type: text/plain; charset="iso-8859-1"

Richard,

The problem may be that somehow the macro variable var3 is resolving to nothing. I would first check that %clean is being invoked correctly with the named parameters. I was able to create the error message you described using this code:

3 data _null_; 4 if in('stuff'); -- 68 5 run;

ERROR 68-185: The function IN is unknown.

NOTE: The SAS System stopped processing this step because of errors. NOTE: The DATA statement used 0.11 seconds.

Kind regards,

Rob Workman

-----Original Message----- From: (richard Simhon) [mailto:Richard.Simhon@CORNHILL.CO.UK] Sent: Wednesday, April 04, 2001 5:40 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Macro help

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. **********************************************************************


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