22 GOPTIONS ACCESSIBLE; 23 %let topMetros = array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' 23 ! '14460'); 24 25 %macro count(toomany); 26 %do i = 1 %to &toomany; 27 data geog.uscis_ois_lpr_s5_mtr&i. (drop = metro:); 28 set geog.uscis_ois_lpr_s5_metros; 29 &topMetros; 30 31 if CBSA_CODE = topMetros[&i.] then 32 output geog.uscis_ois_lpr_s5_mtr&i.; 33 34 run; 35 36 %end; 37 %mend count; 38 %count(10); ERROR: Undeclared array referenced: array. NOTE 138-205: Line generated by the macro variable "TOPMETROS". 38 array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' '14460') _ 22 ERROR 22-322: Syntax error, expecting one of the following: +, =. NOTE: Line generated by the macro variable "TOPMETROS". 38 array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' '14460') _ 200 ERROR 200-322: The symbol is not recognized and will be ignored. NOTE: Line generated by the macro variable "TOPMETROS". 38 array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' '14460') _______ 68 ERROR 68-185: The function METRO10 is unknown, or cannot be accessed. 2 The SAS System 15:19 Monday, November 14, 2016 NOTE: Line generated by the macro variable "TOPMETROS". 38 array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' '14460') _______ 388 ERROR 388-185: Expecting an arithmetic operator. NOTE: Line generated by the macro variable "TOPMETROS". 38 array[10] $5 metro1-metro10 ('35620' '31090' '33100' '16980' '41860' '47900' '26420' '19100' '41940' '14460') _______ 76 ERROR 76-322: Syntax error, statement will be ignored. ERROR: Undeclared array referenced: topMetros. ERROR: Variable topMetros has not been declared as an array. NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 3537:113 WARNING: The variable 'metro:'n in the DROP, KEEP, or RENAME list has never been referenced. NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set GEOG.USCIS_OIS_LPR_S5_MTR1 may be incomplete. When this step was stopped there were 0 observations and 36 variables. WARNING: Data set GEOG.USCIS_OIS_LPR_S5_MTR1 was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds
... View more