how to add extra rows to the existing data set in sas university edition?
ex- i have only 5 rows , how can i automatcally increase rows with empty values
how to make the 5 rows as 500 rows
please try this example, hope it helps
data have;
set sashelp.class end=eof;
output;
if eof then do i = 1 to 500;
call missing (name,sex,age,height,weight);
output;
end;
run;
Hi and welcome to the SAS Communities 🙂
You can do something like this
data have;
input id $ var;
datalines;
1 1
2 2
3 3
4 4
5 5
;
data want(drop=i);
set have end=lr;
output;
if lr then do;
call missing (of _numeric_);
call missing (of _character_);
do i=1 to 495;
output;
end;
end;
run;
One idea: do a loop that counts to 100 for every observation read.
Note that just adding "empty" records only wastes space, but achieves nothing else that has any information value.
PS I corrected your meaningless subject line.
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.