Thank you, David, Jamie, and other readers. I tried to use % of under 18, Black, and Hispanic from DP05.CVS. How to fix the errors below? Thank you. Best, Qing
PROC IMPORT OUT= agerace1
DATAFILE= "C:\DP05.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=3;
RUN;
13698 data agerace;
13699 set agerace1;
13700 Keep GEO Under18 Black Hispanic;
13701 GEO=INPUT(SUBSTR (GEO_ID,10,11),11.);
13702 Under18=input(DP05_0019PE, BEST12.)/100;
13703 Black=input(DP05_0038PE, BEST12.)/100;
13704 Hispanic=input(DP05_0071PE, BEST12.)/100;
13705 run;
NOTE: Invalid argument to function INPUT at line 13702 column 9.
NOTE: Invalid argument to function INPUT at line 13703 column 7.
NOTE: Invalid argument to function INPUT at line 13704 column 10.
GEO_ID=1400000US37019990100 NAME=Census Tract 9901, Brunswick County, North Carolina DP05_0001E=0 DP05_0001M=12 DP05_0001PE=0 DP05_0001PM=(X) DP05_0002E=0 DP05_0002M=12 DP05_0002PE=- DP05_0002PM=** DP05_0003E=0 DP05_0003M=12 DP05_0003PE=- DP05_0003PM=**
. . . .DP05_0088PM=** DP05_0089E=0 DP05_0089M=12
DP05_0089PE=- DP05_0089PM=** GEO=37019990100 Under18=. Black=. Hispanic=. _ERROR_=1 _N_=117
OTE: Invalid argument to function INPUT at line 13702 column 9.
NOTE: Invalid argument to function INPUT at line 13703 column 7.
NOTE: Invalid argument to function INPUT at line 13704 column 10.
WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
GEO_ID=1400000US37133990100 NAME=Census Tract 9901, Onslow County, North Carolina DP05_0001E=0 DP05_0001M=12 DP05_0001PE=0
DP05_0001PM=(X) DP05_0002E=0 DP05_0002M=12 DP05_0002PE=- DP05_0002PM=** DP05_0003E=0 DP05_0003M=12 DP05_0003PE=- DP05_0003PM=**
DP05_0089PE=- DP05_0089PM=** GEO=37133990100 Under18=. Black=. Hispanic=. _ERROR_=1 _N_=1547
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
25 at 13702:36 25 at 13703:34 25 at 13704:37
NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to missing values.
Each place is given by: (Number of times) at (Line):(Column).
25 at 13702:9 25 at 13703:7 25 at 13704:10
NOTE: There were 2195 observations read from the data set WORK.AGERACE1.
NOTE: The data set WORK.AGERACE has 2195 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.26 seconds
cpu time 0.20 seconds