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 (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 27 Oct 2008 05:41:00 -0400
Reply-To:     Jim Groeneveld <jim.1stat@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jim Groeneveld <jim.1stat@YAHOO.COM>
Subject:      Re: how to assign a same variable into two different new
              variables in SAS
Comments: To: leonhardyee06@GMAIL.COM

Hi Les_Daniel,

Your code has a quote to many in the 2nd value line. Furthermore the VALUE statement in this case should be followed by the MULTILABEL option. Finally multilabels are only supported by TABULATE and MEANS (SUMMARY), not in any other PROC or data step. In those PROCs or data step only the firstly defined association between the value and the format applies. That is why the most important association has to be defined firstly. So:

proc format; value $stock MULTILABEL '34211'='34312' '34211'='34124' /* removed redundant quote */ '31412','33213'='23412' '23456'='56789' ; RUN;

So you can only assign one (firstly) formatted value to another variable; you can't assign a secondary formatted value to another variable. Maybe in the future of SAS.

I don't know if [ '34211'='34312','34124'; ] works. You may find that in the docs or just try it like I would do.

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld

On Mon, 27 Oct 2008 02:21:29 -0700, les_daniel <leonhardyee06@GMAIL.COM> wrote:

>Hi, > is it possible to re-assign a same variable into two different >two variables, as a result of a revision/regruping of codes in the >stocklist as shown using proc format... > >proc format; > value $stock > '34211'='34312' > '34211'='34124'' > '31412','33213'='23412' > '23456'='56789' >; > >i got an error in the 1st two lines cos it seems like it can't read >in the same old code twice assigned in this manner,while the 3rd line >is ok...so it there any possible way to accept the same(old) varable >('34211'), grouped into two new grouping as shown for >classification...? > >'34211'='34312','34124'; /* can be work also? */ > > >thanks


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