<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic create random dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123410#M33919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a random dataset with 1000 observations and 3 variables(Employee_id, sex, age). I want the employee_id to be in the range (5213 to 9899), sex (as male,female or unknown) and age in between 25 to 75. Is there any function/sas proc thru which i can achieve this? I want the employee id to be random rather than consecutive.Thanks for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Jan 2013 00:50:59 GMT</pubDate>
    <dc:creator>Analyticguru_09</dc:creator>
    <dc:date>2013-01-12T00:50:59Z</dc:date>
    <item>
      <title>create random dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123410#M33919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to create a random dataset with 1000 observations and 3 variables(Employee_id, sex, age). I want the employee_id to be in the range (5213 to 9899), sex (as male,female or unknown) and age in between 25 to 75. Is there any function/sas proc thru which i can achieve this? I want the employee id to be random rather than consecutive.Thanks for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 00:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123410#M33919</guid>
      <dc:creator>Analyticguru_09</dc:creator>
      <dc:date>2013-01-12T00:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: create random dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123411#M33920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple way :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc format;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;value sexFmt&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 = "male"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 = "female"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 = "unknown";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;data test;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;format sex sexFmt.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;call streaminit(6875687);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;do empId = 5213 to 9899;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sex = rand("TABLE",0.4,0.4);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; age = 25 + floor(51*rand("UNIFORM"));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc surveyselect data=test out=want n=1000 noprint; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Jan 2013 02:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123411#M33920</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-01-12T02:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: create random dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123412#M33921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PGSTATS - Thanks a lot. I learned something new about the streaminit and rand table option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 01:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/create-random-dataset/m-p/123412#M33921</guid>
      <dc:creator>Analyticguru_09</dc:creator>
      <dc:date>2013-01-14T01:16:21Z</dc:date>
    </item>
  </channel>
</rss>

