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.
Example with %INC using line numbers.
1 OPTIONS SPOOL=1 GENERIC=1 STIMER=0;
2
3 DATA TEST;
4 SET SASHELP.CLNMSG;
5 WHERE LEVEL = "N";
6 RUN;
NOTE: The data set WORK.TEST has 160 observations and 6 variables.
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: The data set WORK.TEST1 has 160 observations and 6 variables.
%LIST example to show lines submitted 1-13 the listed lines appear before the %LIST statement that produces the output.
1 OPTIONS SPOOL=1 GENERIC=1 STIMER=0;
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
13
14
15 %list 1-13;
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.
Example with %INC using line numbers.
1 OPTIONS SPOOL=1 GENERIC=1 STIMER=0;
2
3 DATA TEST;
4 SET SASHELP.CLNMSG;
5 WHERE LEVEL = "N";
6 RUN;
NOTE: The data set WORK.TEST has 160 observations and 6 variables.
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: The data set WORK.TEST1 has 160 observations and 6 variables.
%LIST example to show lines submitted 1-13 the listed lines appear before the %LIST statement that produces the output.
1 OPTIONS SPOOL=1 GENERIC=1 STIMER=0;
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
13
14
15 %list 1-13;
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.