LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2006, 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 Mar 2006 21:42:24 -0500
Reply-To:     "Droogendyk, Harry" <harry.droogendyk@RBC.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Droogendyk, Harry" <harry.droogendyk@RBC.COM>
Subject:      Re: I need a macro maven STAT!!!
Content-Type: text/plain; charset="iso8859-1"

Joe:

I wonder how SCL will solve this problem:

2 proc build; ERROR: Procedure BUILD not found. 3 run;

Base SAS includes macro, but not the requisite chunks to create / compile SCL. Many of us are not as fortunate as you evidently are, ie. AF isn't licensed at my installation.

If any of my assumptions are wrong, please enlighten me.

Thanks

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of Joe Whitehurst Sent: 2006, March, 15 7:16 PM To: 'Wainwright, Andrea'; SAS-L@LISTSERV.UGA.EDU Subject: RE: I need a macro maven STAT!!!

Andrea,

Five days and 13 minutes later and still trying to solve the *same* problem with the arcane and antiquated Macro Facility? Within this time, you could have easily and completely mastered the tiny bit of SAS Component Language necessary to free you completely and forever from depending on the arcane and antiquated Macro Facility and the fanatical MMMMs who continue to clamor for its continued use.

Joe

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Wainwright, Andrea Sent: Wednesday, March 15, 2006 5:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: I need a macro maven STAT!!!

OK, I have a simple macro:

%macro var_list (exclude=); proc sql noprint ; select name into : Depvars separated by " " from dictionary.columns where libname = "WORK" and memname = "ABCDE" and upcase(name) not in (&exclude) ; quit ; %mend;

%var_list(exclude='A' 'B') %put model a = &DepVars ; %put model b = &DepVars ;

Works fine.

But, I can't be sure that people are going to upcase the exclude list.

So I thought I should do: %macro var_list (exclude=); proc sql noprint ; select name into : Depvars separated by " " from dictionary.columns where libname = "WORK" and memname = "ABCDE" and upcase(name) not in (%qupcase(&exclude)) ;/*added qupcase here to preserve single quotes*/ quit ; %mend;

But then my log shows: MPRINT(VAR_LIST): proc sql noprint ; SYMBOLGEN: Macro variable EXCLUDE resolves to 'A' 'B' NOTE: Line generated by the macro function "QUPCASE". 2 'A' 'B' - 22 - 202 MPRINT(VAR_LIST): select name into : Depvars separated by " " from dictionary.columns where libname = "WORK" and memname = "ABCDE" and upcase(name) not in ('A' 'B') ; ERROR 22-322: Syntax error, expecting one of the following: a quoted string, a numeric constant, a datetime constant, a missing value, (, -, SELECT.

ERROR 202-322: The option or parameter is not recognized and will be ignored.

MPRINT(VAR_LIST): quit ;

Of course the select statement it generates is perfect. I can cut and paste it into the editor window and run it just fine.

So what am I missing here?

(PC SAS v 9.1 if it helps)

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

_______________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.


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