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 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 29 Apr 2002 14:12:32 +0200
Reply-To:     Lex jansen <lex@LEX-JANSEN.DEMON.NL>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Lex jansen <lex@LEX-JANSEN.DEMON.NL>
Organization: Posted via Supernews, http://www.supernews.com
Subject:      Re: v612 to v82: macro syntax

Hi Peter,

Thanks! I already found that %str(%title&_title)(&txt); also works.

Lex

"Peter Crawford" <peter.crawford@DB.COM> wrote in message news:OFA5444589.80409FF1-ON41256BAA.00438144@db.com... > Hi Lex > V8 is more strict in many places ! > One "feature", means that you cannot invoke a macro when > part of the macro name is provided by a macro variable > %title&_title(&txt); > Doesn't work, but... > %let tname = title&_title; > %&tname(&txt); > Should ! > There are usage notes on the subject, and > there may even be a "hot-fix" ! > > Beware dictionary columns ! > Anything which uses it, must tolerate mixed case variable > names which are stored/retrieved in the mixed case > discovered first by the syntax compiler. > Fortunately, memname is always in uppercase > (except for remote (non-sas) libref definitions in > case-sensitive RDBMS, like m$access ). > > Beware also, that the behaviour of the quote() function changed. > quote() no longer provides a trim() before quoting ! > example var > text length v6.quote() v8.quote() > abc 8 "abc" "abc " > abcdef 8 "abc" "abcdef " > abc 12 "abc" "abc " > > Perhaps the "work-around" is to globally change all your > code wherever "quote(" is found, substitute "quote(trim(" > but I don't feel confident about automatic insertion of the > closing ')' at the _appropriate_ point ! > I was told that v6 sas was "wrong", and v5 behaviour has > been re-implemented !!!! > > In v6 (in)file statements, you could use "device=DDE filevar=triplet" > and change the contents of variable triplet at observation run-time > to dynamically define the spreadsheet range (or word bookmark, or etc). > This is no longer possible in v8 > > I expect the -L will provide many other experiences ! > > Good Luck > Peter Crawford > > > > Datum: 29/04/2002 12:16 > An: SAS-L@LISTSERV.UGA.EDU > > > > > Antwort an: Lex jansen <lex@LEX-JANSEN.DEMON.NL> > > Betreff: v612 to v82: macro syntax > Nachrichtentext: > > We are in the process of migrating from V612 to V82. > So a lot of production code has to be checked. > > The following worked in V612 on WinNT: > > %MACRO TITLE03(text); > %put &text; > %MEND; > > %MACRO DEMO(txt); > > %IF 1=1 %THEN %PUT Test; > %title&_title(&txt); > > %MEND DEMO; > > %DEMO(hello); > > But with 8.2 it fails with: > > 12 %title &_title(&txt); > _ > 180 > WARNING: Apparent invocation of macro TITLE not resolved. > ERROR 180-322: Statement is not valid or it is used out of proper order. > > If I add another semi-colon after the line with %IF (like: %IF 1=1 %THEN > %PUT Test;;) > then it works again in V82. > > Looks like V82 is much stricter on syntax checking! > Does anyone know more examples of this ? > > Lex Jansen > > > > > > -- > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. > > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


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