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
I already found that %str(%title&_title)(&txt); also works.
"Peter Crawford" <peter.crawford@DB.COM> wrote in message
> 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
> Doesn't work, but...
> %let tname = title&_title;
> 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
> 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;
> %MACRO DEMO(txt);
> %IF 1=1 %THEN %PUT Test;
> %MEND DEMO;
> But with 8.2 it fails with:
> 12 %title &_title(&txt);
> 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.