Run your program in BATCH. It appears that %INC line numbers is not supported in Windows DMS where I tested it. As I recall INCing line number ranges was originally for interactive line mode SAS sessions, where it is a sort of poor mans recall.
It also appears that interactive line mode is not supported in windows os.
[pre]
NOTE: This session is executing on the WIN_PRO platform.
NOTE: SAS 9.1.3 Service Pack 4
NOTE: SAS initialization used:
real time 0.25 seconds
cpu time 0.09 seconds
1 OPTIONS SPOOL;
2
3 DATA TEST;
4 SET SASHELP.CLNMSG;
5 WHERE LEVEL = "N";
6 RUN;
NOTE: There were 160 observations read from the data set SASHELP.CLNMSG.
WHERE LEVEL='N';
NOTE: The data set WORK.TEST has 160 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
7
8 DATA TEST1;
9 %inc 4:5 / source2;
NOTE: %INCLUDE (level 1) previous line numbers.
10 +SET SASHELP.CLNMSG;
11 +WHERE LEVEL = "N";
NOTE: %INCLUDE (level 1) ending.
12 RUN;
NOTE: There were 160 observations read from the data set SASHELP.CLNMSG.
WHERE LEVEL='N';
NOTE: The data set WORK.TEST1 has 160 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
2 The SAS System 06:07 Thursday, September 10, 2009
1 OPTIONS SPOOL;
2
3 DATA TEST;
4 SET SASHELP.CLNMSG;
5 WHERE LEVEL = "N";
6 RUN;
7
8 DATA TEST1;
9 %inc 4:5 / source2;
10 SET SASHELP.CLNMSG;
11 WHERE LEVEL = "N";
12 RUN;
13
14 %list 1:20;
13
14 %list 1:20;
NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
real time 0.26 seconds
cpu time 0.10 seconds
[/pre]