<?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 A Data manupulation question with open number of variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/A-Data-manupulation-question-with-open-number-of-variables/m-p/139749#M28176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following dataset with character variables (subject, style) and &lt;BR /&gt;numeric variables (no1, no2, no3 no4,no5.........n)&lt;/P&gt;&lt;P&gt;subject&amp;nbsp; style&amp;nbsp; no1 no2a no3h no4u no5t&lt;BR /&gt;-------&amp;nbsp; -----&amp;nbsp; --- ---&amp;nbsp; ---- ---- --- &lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 9&lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I need to create a data set where if all the numeric variables (no1, no2a, no3h, no4u, no5t...n)&lt;BR /&gt;have 0 or 1 for the same row then that row needed to be deteled. I can not specity the variable name &lt;BR /&gt;in the program and I have to use the code inside a macro and the number of the variable can anything.&lt;/P&gt;&lt;P&gt;I think there might be a way to do something like:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if n01*no2*........*no5t*.....n&amp;nbsp;&amp;nbsp; &amp;lt;1 then detele.&lt;BR /&gt;But not sure how to put in a code to execute.&lt;/P&gt;&lt;P&gt;The result dataset should be as below:&lt;/P&gt;&lt;P&gt;subject&amp;nbsp; style&amp;nbsp; no1 no2a no3h no4u no5t&lt;BR /&gt;-------&amp;nbsp; -----&amp;nbsp; --- ---&amp;nbsp; ---- ---- --- &lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 9&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;&lt;P&gt;Thank you so much from the bottom of my heart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Oct 2014 21:08:02 GMT</pubDate>
    <dc:creator>need_sas_help</dc:creator>
    <dc:date>2014-10-23T21:08:02Z</dc:date>
    <item>
      <title>A Data manupulation question with open number of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-Data-manupulation-question-with-open-number-of-variables/m-p/139749#M28176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following dataset with character variables (subject, style) and &lt;BR /&gt;numeric variables (no1, no2, no3 no4,no5.........n)&lt;/P&gt;&lt;P&gt;subject&amp;nbsp; style&amp;nbsp; no1 no2a no3h no4u no5t&lt;BR /&gt;-------&amp;nbsp; -----&amp;nbsp; --- ---&amp;nbsp; ---- ---- --- &lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 9&lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I need to create a data set where if all the numeric variables (no1, no2a, no3h, no4u, no5t...n)&lt;BR /&gt;have 0 or 1 for the same row then that row needed to be deteled. I can not specity the variable name &lt;BR /&gt;in the program and I have to use the code inside a macro and the number of the variable can anything.&lt;/P&gt;&lt;P&gt;I think there might be a way to do something like:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if n01*no2*........*no5t*.....n&amp;nbsp;&amp;nbsp; &amp;lt;1 then detele.&lt;BR /&gt;But not sure how to put in a code to execute.&lt;/P&gt;&lt;P&gt;The result dataset should be as below:&lt;/P&gt;&lt;P&gt;subject&amp;nbsp; style&amp;nbsp; no1 no2a no3h no4u no5t&lt;BR /&gt;-------&amp;nbsp; -----&amp;nbsp; --- ---&amp;nbsp; ---- ---- --- &lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 9&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;&lt;P&gt;Thank you so much from the bottom of my heart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 21:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-Data-manupulation-question-with-open-number-of-variables/m-p/139749#M28176</guid>
      <dc:creator>need_sas_help</dc:creator>
      <dc:date>2014-10-23T21:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: A Data manupulation question with open number of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-Data-manupulation-question-with-open-number-of-variables/m-p/139750#M28177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;BR /&gt;infile datalines missover;&lt;BR /&gt;input subject $ style $ no1 no2a no3h no4u no5t;&lt;BR /&gt;datalines;&lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp; 9&lt;BR /&gt;1023&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PN&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp; 8&lt;BR /&gt;1098&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SN&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; 0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;cnt=0;&lt;BR /&gt;array no(*) _numeric_;&lt;BR /&gt;do i=1 to dim(no);&lt;BR /&gt;if no{i} not in (0,1,.) then cnt+1;&lt;BR /&gt;end;&lt;BR /&gt;if cnt&amp;gt;0;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 21:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-Data-manupulation-question-with-open-number-of-variables/m-p/139750#M28177</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-10-23T21:21:45Z</dc:date>
    </item>
  </channel>
</rss>

