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 (August 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 15 Aug 2001 16:29:23 +0200
Reply-To:     Francois Torche <torche@I-MINDS.BE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Francois Torche <torche@I-MINDS.BE>
Subject:      Re: macro variable as list for IN operator
Comments: To: rpresley <rpresley@GMCF.ORG>
In-Reply-To:  <C7CCC9FC48DDD311973900508BA36E6E60254F@EXCHANGESERVER>
Content-Type: text/plain; charset="iso-8859-1"

Your problem could not come from the SQL statement but from the macro variable assignment. E.g.: %LET invar = %STR(...) or %NRBQUOTE().

Could you please send your code?

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of rpresley Sent: mercredi 15 août 2001 0:22 To: SAS-L@LISTSERV.UGA.EDU Subject: [SAS-L] macro variable as list for IN operator

SAS-Lers,

I have formed a list of CPT codes into a macro variable. I want to use this macro variable in the IN operator in PROC SQL. Please advise me regarding the error.

Thanks.

18 rsubmit; NOTE: Remote submit to MICKEY commencing. SYMBOLGEN: Macro variable INVAR resolves to '97032', '97033', '97034', '97035', '97036', '97110', '97112', '97113', '97116', '97124', '97139', '97140', '97504', '97520', '97530', '97535', '97537', '97542', '97703', '97750', '97770' , '90804', '90805', '90810', '90811', '90816', '90817', '90823', '90824', '90875', '99292', '99374', '99377', '99379' , '90806', '90807', '90812', '90813', '90818', '90819', '90826', '90827', '90876', '95117', '95812', '95920', '95961', '95972', '95973', '95974', '95975', '96100', '96105', '96111', '96115', '96410', '99291', '99354', '99355', '99356', '99357', '99358', '99375', '99377', '99378', '99380' , '90808', '90809', '90814', '90815', '90821', '90822', '90828', '90829', '95813', '95962', '96410', '96414', '96423', '97545', '97546' , '99221', '99222', '99223', '99295', '99296', '99297', '99298' SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. 236 %put the value of INVAR is &invar. ; the value of INVAR is '97032', '97033', '97034', '97035', '97036', '97110', '97112', '97113', '97116', '97124', '97139', '97140', '97504', '97520', '97530', '97535', '97537', '97542', '97703', '97750', '97770' , '90804', '90805', '90810', '90811', '90816', '90817', '90823', '90824', '90875', '99292', '99374', '99377', '99379' , '90806', '90807', '90812', '90813', '90818', '90819', '90826', '90827', '90876', '95117', '95812', '95920', '95961', '95972', '95973', '95974', '95975', '96100', '96105', '96111', '96115', '96410', '99291', '99354', '99355', '99356', '99357', '99358', '99375', '99377', '99378', '99380' , '90808', '90809', '90814', '90815', '90821', '90822', '90828', '90829', '95813', '95962', '96410', '96414', '96423', '97545', '97546' , '99221', '99222', '99223', '99295', '99296', '99297', '99298'

237 proc sql; 238 create table time_limit_procs as 239 select rec_id, proc_cd, units, amt_pd 240 from mdclaims.claims_details 241 where rec_id >=990000000000 242 and proc_cd in (&invar) SYMBOLGEN: Macro variable INVAR resolves to '97032', '97033', '97034', '97035', '97036', '97110', '97112', '97113', '97116', '97124', '97139', '97140', '97504', '97520', '97530', '97535', '97537', '97542', '97703', '97750', '97770' , '90804', '90805', '90810', '90811', '90816', '90817', '90823', '90824', '90875', '99292', '99374', '99377', '99379' , '90806', '90807', '90812', '90813', '90818', '90819', '90826', '90827', '90876', '95117', '95812', '95920', '95961', '95972', '95973', '95974', '95975', '96100', '96105', '96111', '96115', '96410', '99291', '99354', '99355', '99356', '99357', '99358', '99375', '99377', '99378', '99380' , '90808', '90809', '90814', '90815', '90821', '90822', '90828', '90829', '95813', '95962', '96410', '96414', '96423', '97545', '97546' , '99221', '99222', '99223', '99295', '99296', '99297', '99298' SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing. NOTE: Line generated by the macro variable "INVAR". 242 '97032', '97033', '97034', '97035', '97036', '97110', '97112', '97113', '97116', '97124', - 22 - 76 242! '97139', '97140', '97504', '97520', '97530', '97535', '97537', '97542', '97703', '97750', 242! '97770' , '90804', '90805', '90810', '90811', '90816', '90817', '90823', ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, (, -, SELECT.

ERROR 76-322: Syntax error, statement will be ignored.

243 ; NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. 244 quit; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used: real time 0.00 seconds cpu time 0.01 seconds

NOTE: Remote submit to MICKEY complete.

Rodney J. Presley, PhD Georgia Medical Care Foundation 57 Executive Park South, NE suite 200 Atlanta, GA 30329-2224

404-982-0411 ext. 7574 404-982-7592 fax

rpresley@gmcf.org

------------------------ CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files or previous e-mail messages attached to it may contain proprietary, privileged or confidential information. If you are not an intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify me by reply e-mail and destroy the original transmission and its attachments without saving them in any manner. -----------------------


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