Try this instead for yearcount calculation:
%let years=9899;
%let yearcount=19%substr(&years,3,2)-1950; /* build the calculation */
%let yearcount=%eval(&yearcount); /* do the calculation */
This will resolve yearcount to:
49
Your code resolve yearcount to:
input('19' || substr('9899',3,2),best4.)-1950
Diference is, the way the calculation is performed, in your case at run time, in my sugestion at compile time.
And:
array x(input('19' || substr('9899',3,2),best4.)-1950);
is not a valid syntax, but:
array x(49)
is.
Greetings from Portugal.
Daniel Santos at www.cgd.pt
... View more