<?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: PROC SURVEYSELECT with Constraints in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51236#M14022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a where statement within surveyselect, e.g.,&lt;/P&gt;&lt;P&gt;Proc surveyselect data=data1 (where = (c=1)) out=sample method=srs sampsize=50;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Proc surveyselect data=data1 out=sample method=srs sampsize=50;&lt;/P&gt;&lt;P&gt;where c=1;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; color: #333333; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Nov 2011 02:48:03 GMT</pubDate>
    <dc:creator>mfisher</dc:creator>
    <dc:date>2011-11-21T02:48:03Z</dc:date>
    <item>
      <title>PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51235#M14021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to randomly select n samples from a larger data set X of various variables (a, b, c). Up to now I've used the SURVESELECT statement, which is basically fine. However, I need to implement a constraint, such that only samples with realizations of c=1 are considered for the drawing. I can only think of using DATA to create a new data set of all samples c=1, on which I use the SURVEYSELECT function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know a quick and efficient way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your great support!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Nov 2011 17:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51235#M14021</guid>
      <dc:creator>MarkGIP</dc:creator>
      <dc:date>2011-11-20T17:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51236#M14022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use a where statement within surveyselect, e.g.,&lt;/P&gt;&lt;P&gt;Proc surveyselect data=data1 (where = (c=1)) out=sample method=srs sampsize=50;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Proc surveyselect data=data1 out=sample method=srs sampsize=50;&lt;/P&gt;&lt;P&gt;where c=1;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; color: #333333; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 02:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51236#M14022</guid>
      <dc:creator>mfisher</dc:creator>
      <dc:date>2011-11-21T02:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51237#M14023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; And if you plan to do this for ALL levels of c, sort by c and use a BY statement in PROC SURVEYSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 14:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51237#M14023</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-11-21T14:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51238#M14024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, mfischer! I thought the WHERE statement won't work with PROC SURVEYSELECT:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Rick: Would you mind explaining the sorting in a little bit more detail. Indeed I'm planning to do this for all levels of c. But why do I need to sort the original data set when I use the WHERE option? And where does the BY statement go in PROC SURVEYSELECT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THX!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 16:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51238#M14024</guid>
      <dc:creator>MarkGIP</dc:creator>
      <dc:date>2011-11-21T16:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51239#M14025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; BY-group processing is fundamental to SAS programming.&amp;nbsp; It tells a SAS procedure to repeat an analysis for every unique value of the variables listed on the BY statement. The data must first be sorted by the variables that you are listing on the BY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some documentation is here: &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a001278468.htm"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a001278468.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone recommend some tutorial-level SUGI papers or other "getting started" resources?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2011 16:39:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51239#M14025</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-11-21T16:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51240#M14026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick for all your effort!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just one more question regarding the WHERE option in combination with PROC SURVEYSELECT. Is it possible to combine the WHERE option with values from another data set?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In detail: I'm trying to draw several observations from a data set X which fulfill certain conditions, which are specified in the WHERE option. One of the conditions is that none of the drawn values is equal to the values of a different data set Y. Since the values of Y are not static It would be great if the where option could take the specific values of Y automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;x= [1 2 ....... 100]&lt;/P&gt;&lt;P&gt;y= [2 55 83 99]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Draw 10 observations of X. Exclude the values of Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If tried it with the exact location of the other data sat (i.e.: proc surveyselect data=work.x (where=(X&amp;lt;&amp;gt;work.Y))) but it won't accept it:(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your great support!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 12:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51240#M14026</guid>
      <dc:creator>MarkGIP</dc:creator>
      <dc:date>2011-12-10T12:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51241#M14027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can just add a step to generate the list of values to exclude. One way is to create a macro variable with the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;* Setup some data for the example;&lt;/P&gt;&lt;P&gt;data y;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do y=2,55,83,99; output; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do x=1 to 100; output; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Create the list into a macro variable ;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select distinct y into :ylist separated by ' ' &lt;/P&gt;&lt;P&gt; from y&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Use the list in a WHERE dataset option ;&lt;/P&gt;&lt;P&gt;proc surveyselect data=x (where=(x not in (&amp;amp;ylist))) ....&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 17:06:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51241#M14027</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-10T17:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51242#M14028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to admit that I have no experience with macro variables. I've tried to implement your code in SAS. However, I don't really get it to work. When I ran the code with a sample size of 96 the PROC SURVEYSELECT data set "test" contained also the excluded values of y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the exact code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt;data y;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;do y=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;2&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;55&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;83&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;99&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data x;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Courier New; color: #0000ff; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;do x=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;100&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;output&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;proc sql noprint;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;select &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; y &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; :ylist separated &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;''&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;from y;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;quit;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;surveyselect&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;=x (where=(x not in (&amp;amp;ylist)))&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;method&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;SRS&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;sampsize&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;96&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;seed&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;0&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt;=test;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG style=": ; color: #000000; font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/STRONG&gt;&lt;SPAN style="font-family: Courier New; font-size: 10pt;"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;P&gt;Thank you so much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 00:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51242#M14028</guid>
      <dc:creator>MarkGIP</dc:creator>
      <dc:date>2011-12-11T00:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51243#M14029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please change "separated by ' '" to "separated by ',' "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data y;&lt;/P&gt;&lt;P&gt;do y=2,55,83,99; output; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;do x=1 to 100; output; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;select distinct y into :ylist separated by ',' &lt;/P&gt;&lt;P&gt;from y;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc surveyselect data=x (where=(x not in (&amp;amp;ylist)))method=SRS sampsize=96 seed=0 out=test;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 00:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51243#M14029</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2011-12-11T00:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51244#M14030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to use a comma, you can use either a comma or spaces to separate lists of numbers.&lt;/P&gt;&lt;P&gt;The problem with Mark's code is that there is no space inside the quotes so the value turns into one really long string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;91&amp;nbsp;&amp;nbsp; %put &amp;amp;ylist;&lt;/P&gt;&lt;P&gt;2558399&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 02:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51244#M14030</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-12-11T02:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51245#M14031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tom!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 02:47:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51245#M14031</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2011-12-11T02:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SURVEYSELECT with Constraints</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51246#M14032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Silly me.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help, Tom!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 09:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SURVEYSELECT-with-Constraints/m-p/51246#M14032</guid>
      <dc:creator>MarkGIP</dc:creator>
      <dc:date>2011-12-11T09:45:16Z</dc:date>
    </item>
  </channel>
</rss>

