Hi! I'm repeating the same process for 13 prefixed and am wondering if it could be done with array methods. Here is the code I tried but got an error message: data data_wide;
set data_array;
array prefix{13} pa pb pc pd pe pf pg ph pi pj pk pl pm;
do n = 1 to 13;
if prefix{n}_15 = . or prefix{n}_45 = . then do;
prefix{n}_15 = .;
prefix{n}_45 = .;
end;
end;
run; ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *,
**, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN,
LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=. I don't want to revert back to just copy-and-pasting the same code 13 times but how could I make the process more efficient and neat? Would appreciate any help. Thank you!
... View more