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.
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.