Please reply again and this time include a "pasted SAS log" record of what problem / error messages you are getting. It appears you are using SAS macro variable(s), so you will want to include as much information about your program execution as possible, by including this command in your SAS script to add as much diagnostic output to the SAS log, revealing your program flow as possible:
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MPRINT;
Also, sharing information about your SAS environment will help as well, such as has your program ever run successfully (is it new or existing?), what OS platform are you running SAS on, is SAS installed local or on a "connected" server, maching, and also SAS version info.
Also, I believe you have some challenges using the SAS SET statement and those dataset options when you are attempting to compute the first-observations to start and the observation-count to execute.
Scott Barry
SBBWorks, Inc.