From: Ching on
Hi everyone.

May I please ask why only raceF but not ethnicityF can be loaded to my
'e' dataset? Somehow only format name less than 8 letters can be
loaded. I tried shortening ethnicityF to ethniciF then it would be
fine. What should I do so I can use ethnicityF(also longer format
name) rather than raceF?

proc format;
value ethnicityF 1='Chinese' 2='European' 3='Indian';
value raceF 1='Chinese' 2='European' 3='Indian';
run;
data e;
format eth ethnicityF.;
input id eth @@;
datalines;
1 1 2 2 3 3
;
run;

Many thanks in advance.
Have a great weekend.
From: Richard A. DeVenezia on
On Mar 11, 5:20 am, Ching <kcwo...(a)gmail.com> wrote:
> Hi everyone.
>
> May I please ask why only raceF but not ethnicityF can be loaded to my
> 'e' dataset? Somehow only format name less than 8 letters can be
> loaded. I tried shortening ethnicityF to ethniciF then it would be
> fine. What should I do so I can use ethnicityF(also longer format
> name) rather than raceF?
>
> proc format;
> value ethnicityF 1='Chinese' 2='European' 3='Indian';
> value raceF 1='Chinese' 2='European' 3='Indian';
> run;
> data e;
> format eth ethnicityF.;
> input id eth @@;
> datalines;
> 1 1 2 2 3 3
> ;
> run;
>
> Many thanks in advance.
> Have a great weekend.

What version of SAS are you using ?
Earlier versions limited the length of format names to eight
characters.

--
Richard A. DeVenezia
http://www.devenezia.com
From: Ching on
Hi everyoyone.

I'm using version 9.1 (TS1M3).

So I will have to upgrade to a newer version?

Thanks a lot.
From: hehehehe on
I think it is due the the length of ethnicityF. I reduce it to 8 long
and then it works.


On Mar 11, 5:20 am, Ching <kcwo...(a)gmail.com> wrote:
> Hi everyone.
>
> May I please ask why only raceF but not ethnicityF can be loaded to my
> 'e' dataset? Somehow only format name less than 8 letters can be
> loaded. I tried shortening ethnicityF to ethniciF then it would be
> fine. What should I do so I can use ethnicityF(also longer format
> name) rather than raceF?
>


> proc format;
> value ethnicityF 1='Chinese' 2='European' 3='Indian';
> value raceF 1='Chinese' 2='European' 3='Indian';
> run;
> data e;
> format eth ethnicityF.;
> input id eth @@;
> datalines;
> 1 1 2 2 3 3
> ;
> run;
>
> Many thanks in advance.
> Have a great weekend.

From: Ching on
When I used proc print then ethinicityF. would work. why is that?



 |  Next  |  Last
Pages: 1 2
Prev: Histogram by the Class ?
Next: how to create mode