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 (February 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Feb 1998 07:27:16 -0500
Reply-To:     Xi Chen <chenxi@EASYWAY.NET>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Xi Chen <chenxi@EASYWAY.NET>
Subject:      Re: Macro help
Content-Type: text/plain; charset="us-ascii"

You may try the following:

call symput('fidmax'||left(_n_),max);

The reason your code does not work is that if SAS is smart enough to convert _n_, which is numeric, into a character, it is right justified. As a reason, for a single digit _n_, it will leave a blank space in your macro variable name, which is not allowed. Hope it helps.

Chen Xi, Ph.D. PharmClint Co. ==================================================================== Hi SAS users,

I want to create a series of macro variables using call symput in data step. My code, shown below, does not work.

data _null_; set temp; call symput('fidmax' || _n_,max);

Could anyone help me with this?

Thx!

Tim Pi


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