I am looping trough dates easily with this piece of code :
data _null_; do year = 2000 to 2020; call execute(cats(\'%nrstr(%annual_function)(\',year,\')\'