<?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 Re: How to create a random number seed at the start of a simulation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104100#M21745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you want to save the last SEED used at each step/interation as the SEED for the next.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the CALL version of the random number function you can track the seed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also SURVEYSELECT will create macro variables with seed info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;surveyselect&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=sashelp.class &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=sample &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;rate&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.5&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;=SYSRANDOM &amp;amp;=SYSRANEND;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Oct 2013 18:16:33 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2013-10-04T18:16:33Z</dc:date>
    <item>
      <title>How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104099#M21744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a large simulation, that involves several data steps and a few loops.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to set a single random number seed at the start of the simulation, and thus have a single reproducible stream of random numbers. How can I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simulation, in pseudo-code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data step A creating uniform random variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Loop 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data step B creating more uniform random variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; More PROCs and Data steps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data step C creating more uniform random variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC SOMETHING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End of Loop 2&lt;/P&gt;&lt;P&gt;End of Loop 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 17:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104099#M21744</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-10-04T17:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104100#M21745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you want to save the last SEED used at each step/interation as the SEED for the next.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the CALL version of the random number function you can track the seed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also SURVEYSELECT will create macro variables with seed info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;surveyselect&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=sashelp.class &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=sample &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;rate&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.5&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;=SYSRANDOM &amp;amp;=SYSRANEND;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 18:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104100#M21745</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-10-04T18:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104101#M21746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact, all procedures (or almost) will update the SYSRANEND macro variable. Although not perfect (check the documentation) this seems to be the best method to carry a seed from one procedure to the next. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 18:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104101#M21746</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-10-04T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104102#M21747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paige,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had come up with the same idea as DataNull did .. i.e., capturing the latest seed in a datastep using call ranuni.&amp;nbsp; The following code shows that it produces the same result as I think you are trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data part1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; seed=872643;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ranuni(seed,random);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('seed',seed);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data part2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; seed=&amp;amp;seed.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ranuni(seed,random);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('seed',seed);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data part3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; seed=&amp;amp;seed.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ranuni(seed,random);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput('seed',seed);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 30;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; random=ranuni(872643);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 18:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104102#M21747</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-10-04T18:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104103#M21748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example of using last seed as next seed with data steps.&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; seed=121853;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; one;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sashelp.class &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=eof;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; seed &amp;amp;seed;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _n_ eq &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'NOTE: '&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; seed=;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; ranuni(seed,y);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; two;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; _n_ eq &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;do&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; one(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=seed) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;point&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=nobs &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;nobs&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=nobs;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'NOTE: '&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; seed=;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;end&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sashelp.class;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; ranuni(seed,y2);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 18:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104103#M21748</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-10-04T18:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104104#M21749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all, looks like I have several solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I just need a hotline to &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;, &lt;A __default_attr="149594" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; and &lt;A __default_attr="468858" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;, and should just skip the forum entirely &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 19:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104104#M21749</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-10-04T19:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104105#M21750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paige,&lt;/P&gt;&lt;P&gt;You got great solutions in an hour. You are the luckiest man today and should go out to buy lottery tickets. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 19:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104105#M21750</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2013-10-04T19:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104106#M21751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/64814/HTML/default/viewer.htm#p0wl5clld5bl24n1w6wm7s6sheie.htm"&gt;Using SYSRANDOM and SYSRANEND Macro Variables to Produce Random Number Streams&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 19:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104106#M21751</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-10-04T19:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104107#M21752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Linlin wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Paige,&lt;/P&gt;
&lt;P&gt;You got great solutions in an hour. You are the luckiest man today and should go out to buy lottery tickets.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Statisticians don't believe in purchasing lottery tickets, the expected gain is negative, worse than just putting money in a savings account that pays 0.5% annually. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 19:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104107#M21752</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-10-04T19:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104108#M21753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="9481" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;, Sure am glad I'm not a statistician.&amp;nbsp; Conversely, putting money into a savings account that pays 0.5% annually, only has the potential of resulting in a loss when one considers the effects of inflation and the taxes one has to be on the interest. While the likelihood of winning the grand prize of tomorrow's Canadian lottery ($26 million) has rather poor odds ( 1 in 13,983,816) the potential IS a bit larger than a savings account, the psychological excitement about the possibility of winning exists and, in the unlikely event that one does actually win, the winnings are tax free.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 20:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104108#M21753</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-10-04T20:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104109#M21754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Compared to my friends who regularly play the lottery and football pools and the like, I have not lost a single penny, while they have lost thousands of dollars. I like my situation better than theirs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My ex-mother-in-law bought 5 dollars in Lottery tickets every week that I knew her. Once I asked her if she ever won anything, and she very enthusiastically replied that Yes, once, she won $50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck with your lottery tickets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 20:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104109#M21754</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-10-04T20:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104110#M21755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering where I can get 0.5% on a savings account. Locally with my balance it's closer to 0.01%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course if I only buy a lottery ticket with the max payout is large enough then the expected winning become positive. But living long enough to play enough times ...:smileylaugh:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 22:51:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104110#M21755</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-10-04T22:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104111#M21756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;One quote I like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;EM&gt;&lt;SPAN lang="EN-CA" style="color: #1f497d; font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;"Limits on knowledge and computation are central to the human condition."&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;EM&gt;&lt;SPAN lang="EN-CA" style="color: #1f497d; font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;by Herbert A. Simon in&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt; &lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt;Models of Bounded Rationality: Empirically grounded economic reason,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt; MIT Press, 1982&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt;Many profitable industries depend on those limits: insurance, lotteries and casinos, marketing, stock trading, to name a few. And I never forget that some might want to add statistics to the list.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;&lt;SPAN lang="EN-CA" style="font-family: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-CA; mso-fareast-language: FR-CA; mso-bidi-language: AR-SA;"&gt;&lt;SPAN class="fn"&gt;&lt;SPAN dir="ltr"&gt;PG &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Oct 2013 17:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104111#M21756</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-10-05T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a random number seed at the start of a simulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104112#M21757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is covered on p. 33-34 of &lt;A href="http://support.sas.com/publishing/authors/wicklin.html"&gt;my book&lt;/A&gt;. Assuming that "Loop 1" is a macro loop, I think you can get rid of it and gain some efficiency in your simulation by using BY processing. See Chapter 6 of my book or see the article &lt;A href="http://blogs.sas.com/content/iml/2012/07/18/simulation-in-sas-the-slow-way-or-the-by-way/" title="http://blogs.sas.com/content/iml/2012/07/18/simulation-in-sas-the-slow-way-or-the-by-way/"&gt;Simulation in SAS&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 18:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-random-number-seed-at-the-start-of-a-simulation/m-p/104112#M21757</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-10-09T18:34:42Z</dc:date>
    </item>
  </channel>
</rss>

