The option fobs=&fobs is in correct , it should be firstobs= the value of the firstobs= should be the starting observation number and that of obs= should be the observation number till where you need to output the data. So i have modified your macro the below way, please try %macro M1(fobs,ob,ds); options firstobs=&fobs obs=&ob; data &ds; set have; run; %mend; %m1(1,10000,new_1) %m1(10001,20000,new_2) %m1(20001,30001,new_3) %m1(30002,40002,new_4) %m1(40003,50003,new_5) %m1(50004,60004,new_6) %m1(60005,70005,new_7) %m1(70006,80006,new_8) %m1(80007,90007,new_9) %m1(90008,100002,new_10) Thanks, Jagadish
... View more