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
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:
value $stock MULTILABEL
'34211'='34124' /* removed redundant quote */
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
On Mon, 27 Oct 2008 02:21:29 -0700, les_daniel <leonhardyee06@GMAIL.COM>
> 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...
> value $stock
>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
>'34211'='34312','34124'; /* can be work also? */