Prev: Histogram by the Class ?
Next: how to create mode
From: Ching on 11 Mar 2010 05:20 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 11 Mar 2010 12:55 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 11 Mar 2010 19:44 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 12 Mar 2010 15:09 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 16 Mar 2010 20:24
When I used proc print then ethinicityF. would work. why is that? |