🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 06-20-2020 06:40 AM
(602 views)
when i run this coding, the price always change everytime I run it. is it possible to make it become fix? I want it to be fix no matter how much run I did on it.
PROC SQL;
UPDATE WORK.data2
SET 'Price (RM)'n=RAND("INTEGER",12,15);
RUN;
PROC PRINT DATA=WORK.data2;
RUN;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please try the seed, we need to use seed to make the rand generate consistent values
data data3;
set data2;
call streaminit(123);
'Price (RM)'n=RAND("INTEGER",12,15);
RUN;
PROC PRINT DATA=WORK.data3;
RUN;
Thanks,
Jag
Jag
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please try the seed, we need to use seed to make the rand generate consistent values
data data3;
set data2;
call streaminit(123);
'Price (RM)'n=RAND("INTEGER",12,15);
RUN;
PROC PRINT DATA=WORK.data3;
RUN;
Thanks,
Jag
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much. It's working