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 (December 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 13 Dec 2002 15:53:18 -0600
Reply-To:     Sterling Price <Sterling.Price@WAL-MART.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sterling Price <Sterling.Price@WAL-MART.COM>
Subject:      resolve macro variable containing & sign?
Comments: cc: Beth Pautsch <Beth.Pautsch@wal-mart.com>
Content-Type: text/plain; charset="iso-8859-1"

Greetings,

How can I resolve a macro variable that contains & as one of the characters in the string assigned to it?

Example:

The file IN1 contains a character string that looks like: .&c¢V+Fé].-.ßL&ÿñj(ö*èî¿<Î.

(these are actually Chinese DBCS characters in case you are wondering)

In the data step below, as soon as the first reference to &STRING1 is made, the program abends with the error shown:

DATA _NULL_;

INFILE IN1; INPUT @001 STRING1 $80.; PUT STRING1=;

CALL SYMPUT('STRING1',STRING1);

RUN;

%PUT &STRING1;

ERROR: Symbolic variable name C¢V must contain only letters, digits, and underscores.

So, it's apparent that SAS is trying to resolve &c¢V as a macro variable.

I have tried it with and without the DBCS/DBCSLANG=CHINESE system options and gotten the same result.

Is there a way to resolve &STRING1 and not attempt to resolve &c¢V ?

Also, this problem became apparent when converting a SAS 6.09 program to SAS 8.2. The SAS 6.09 version seemingly does not behave the same way - it generates a warning, but that's all. The value in &STRING1 is resolved (I know there are missing characters but I believe this is a limitation of the SDSF output viewer, where I copied these results from).

WARNING: Apparent symbolic reference C not resolved. 13 14 %PUT &STRING1; &c¢V+F - L& j(ö* <

Is there some system option that controls this behavior that might have been set differently in v6.09 than it is is v8.2?

Thanks everyone,

Sterling Price

********************************************************************** This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately. ********************************************************************** Wal-Mart Stores, Inc. Confidential **********************************************************************


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