If you mean by order, the first 12 records are to be one then:
data want;
set have;
if _n_ le 12 then variable=1;
else variable=2;
run;
_n_ is a SAS automatic variable that counts iterations of a data step. In a simple use like this it is basically the row number.
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.