Reverse style, the previous was PDV to Hash, this time Hash to PDV. When Hashman takes personal interest offline in getting me to speed, I love experimenting Guru's teachings
data have;
input word $;
datalines;
A
B
C
D
;
data want;
dcl hash H (dataset:'have',ordered: "A") ;
h.definekey ('word') ;
h.definedone () ;
dcl hiter hh('h');
do _n_=1 to 1000;
do while(hh.next()=0);
output;
end;
end;
stop;
set have;
run;
The function is SURVEYSELECT. Set the REP to be the number of replicates and the sampling rate to be 100% (1).
proc surveyselect data=have out=want method=srs rep=1000 samprate=1; run; proc freq data=want; table word; run;
@changxuosu wrote:
Dear SAS community,
I have a data set like this
A
B
C
D
I want to repeat it 1000 times like
A
B
C
D
A
B
C
D
A
B
C
D
.
.
.
.
.
Is there any SAS function that achives this?
Thank you all! Happy holliday!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: