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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!