I know nobs can be used but just wondering if there also exists a start option since there is an "end" one.
Actually, _N_ contains the number of the current data step iteration. In most cases, since you only execute a set or merge statement once per iteration, this will correspond to the row number, but if you execute these statements more than once, you will get another result.
Compare this:
data test1;
set sashelp.class;
count = _N_;
run;
with this:
data test2;
do until (end_of_file);
set sashelp.class end=end_of_file;
count = _N_;
output;
end;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.