<?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: where statement with same condition on multiple variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641811#M78348</link>
    <description>&lt;P&gt;You can always use a data view like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mySubset / view=mySubset;
set out;
if subpop=1 and cmiss(F_a65_69 -- pmdinsy1) = 0;
run;

proc print data=mySubset; ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Apr 2020 04:28:07 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-04-22T04:28:07Z</dc:date>
    <item>
      <title>where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641788#M78342</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run a procsurvey freq on many variables and would like to print the CrossTabs where all variables have (or do not have) a specific value&lt;/P&gt;&lt;P&gt;Is there a way to stipulate something like:&lt;/P&gt;&lt;P&gt;proc print...;&lt;/P&gt;&lt;P&gt;where (var2 var2 var3) ne .;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a sample of the data - sorry so long but most people have subpop=0&lt;/P&gt;&lt;P&gt;data WORK.EXAMPLE;&lt;BR /&gt;infile datalines dsd truncover;&lt;/P&gt;&lt;P&gt;input DUPERSID:$8. REGIONY1:32. SEX:32. HISPANX:32. RTHLTH1:32. MNHLTH1:32. ADSMOK2:32. INSCOVY1:32. PMDINSY1:32. subpop:32. other_race:32. white:32. afr_am:32. a65_69:32. a70_74:32. a75_79:32. over80:32. married:32. div_sep:32. widowed:32. nev_marry:32. n&lt;BR /&gt;o_hs:32. hs_ed:32. more_hs:32. priv_ins:32. pub_only:32. no_ins:32. good_mhealth:32. norm_undwt:32. overwt:32. obese:32. vobese:32. polypharm:32.;&lt;/P&gt;&lt;P&gt;label DUPERSID="PERSON ID (DUID + PID)" REGIONY1="CENSUS REGION AS OF 12/31/13" SEX="SEX" HISPANX="HISPANIC ETHNICITY (EDITED/IMPUTED)" RTHLTH1="PERCEIVED HEALTH STATUS - RD 1" MNHLTH1="PERCEIVED MENTAL HEALTH STATUS - RD 1" ADSMOK2="SAQ: CURRENTLY SMOKE,R&lt;BR /&gt;2" INSCOVY1="HEALTH INSURANCE COVERAGE INDICATOR 13" PMDINSY1="PMED INSURANCE ANY TIME IN R3";&lt;BR /&gt;datalines;&lt;BR /&gt;10002101 1 1 2 3 3 1 2 2 1 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 1&lt;BR /&gt;10005101 4 2 2 3 3 2 2 2 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1&lt;BR /&gt;10014101 1 2 2 4 4 2 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1&lt;BR /&gt;10019102 2 2 2 3 3 2 1 2 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1&lt;BR /&gt;10027101 1 1 2 3 1 2 2 2 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1&lt;BR /&gt;10027102 1 2 2 5 3 2 2 2 1 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1&lt;BR /&gt;10034101 3 1 2 2 2 -1 1 2 1 0 0 1 0 1 0 0 1 0 0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 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 1 1&lt;BR /&gt;10316101 2 2 2 4 4 1 2 2 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1&lt;BR /&gt;10327101 2 2 2 3 2 2 1 2 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1&lt;BR /&gt;;;;;&lt;/P&gt;&lt;P&gt;I tried this with no luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where subpop=1 and (F_a65_69 -- pmdinsy1 ne .);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Maybe an array but isn't that only in data steps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see form below, my variable names have no pattern to them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output Crosstabs=out;
proc surveyfreq data=meps.analysis;
strata varstr;
cluster varpsu;
weight poolwt;
tables subpop*(a65_69 a70_74 a75_79 over80 sex white afr_am other_race hispanx  married div_sep widowed nev_marry no_hs hs_ed more_hs inscovy1   rthlth1  mnhlth1 norm_undwt overwt obese vobese  adsmok2 curr_smoke polypharm   pmdinsy1 );
run;

proc print data=out;
where subpop=1;
var Frequency WgtFreq StdDeva65_69 a70_74 a75_79 over80 sex white afr_am other_race hispanx  married div_sep widowed nev_marry no_hs hs_ed more_hs inscovy1   rthlth1  mnhlth1 norm_undwt overwt obese vobese  adsmok2 curr_smoke polypharm   pmdinsy1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 00:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641788#M78342</guid>
      <dc:creator>AliRKM</dc:creator>
      <dc:date>2020-04-22T00:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641792#M78344</link>
      <description>&lt;P&gt;Instead of&lt;/P&gt;
&lt;PRE&gt;where subpop=1 and (F_a65_69 -- pmdinsy1 ne .);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where subpop=1 and nmiss(of F_a65_69 -- pmdinsy1) = 0;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Apr 2020 01:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641792#M78344</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-22T01:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641796#M78345</link>
      <description>No luck: Got this in the log:&lt;BR /&gt;&lt;BR /&gt;26 proc print data=out;&lt;BR /&gt;27 where subpop=1 and nmiss(of F_a65_69 -- pmdinsy1) = 0;&lt;BR /&gt;________&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR: Syntax error while parsing WHERE clause.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN,&lt;BR /&gt;CONTAINS, EQ, GE, GT, LE, LIKE, LT, NE, OR, ^=, |, ||, ~=.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;Tried parenthesis:&lt;BR /&gt;where subpop=1 and nmiss(of (F_a65_69 -- pmdinsy1)) = 0;&lt;BR /&gt;&lt;BR /&gt;and got this:&lt;BR /&gt;ERROR: WHERE clause operator requires numeric variables.</description>
      <pubDate>Wed, 22 Apr 2020 02:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641796#M78345</guid>
      <dc:creator>AliRKM</dc:creator>
      <dc:date>2020-04-22T02:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641800#M78346</link>
      <description>&lt;P&gt;You cannot use variable lists in WHERE statement. They essentially follow the SQL rules, not the regular SAS rules.&amp;nbsp; Positional variable lists would probably be difficult anyway.&lt;/P&gt;
&lt;P&gt;You can use an IF statement in a DATA step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
 set sashelp.class;
 if cmiss(of name -- weight);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 03:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641800#M78346</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-22T03:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641811#M78348</link>
      <description>&lt;P&gt;You can always use a data view like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mySubset / view=mySubset;
set out;
if subpop=1 and cmiss(F_a65_69 -- pmdinsy1) = 0;
run;

proc print data=mySubset; ...&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2020 04:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641811#M78348</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-04-22T04:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: where statement with same condition on multiple variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641988#M78362</link>
      <description>&lt;P&gt;Still no luck:&lt;/P&gt;&lt;P&gt;NOTE: A stored DATA STEP view cannot run under a different operating system.&lt;/P&gt;&lt;P&gt;the output is blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to read up on the note but did not understand the comments. Nor do I understand what a data view is - again, despite reading up on it. I have no technical background, my statistics is shaky so this is all beyond me &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 15:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/where-statement-with-same-condition-on-multiple-variables/m-p/641988#M78362</guid>
      <dc:creator>AliRKM</dc:creator>
      <dc:date>2020-04-22T15:10:20Z</dc:date>
    </item>
  </channel>
</rss>

