<?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: calculate how many arguments are in &amp;amp;vector. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476690#M122686</link>
    <description>&lt;P&gt;I found the answer&lt;/P&gt;&lt;P&gt;%let n=%sysfunc(countw(&amp;amp;vector));&lt;BR /&gt;%put &amp;amp;n.;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 08:27:10 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2018-07-10T08:27:10Z</dc:date>
    <item>
      <title>calculate how many arguments are in &amp;vector.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476689#M122685</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;User define a sas macro variable called vector.&lt;/P&gt;&lt;P&gt;%let vector=1805+1804+1712+1704;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create another sas&amp;nbsp;&lt;SPAN&gt;macro variable called n that will calculate how many arguments are in &amp;amp;vector.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to calculate it in open code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In this example &amp;amp;n. will get value 4 because there are 4 arguments in &amp;amp;vector.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Joe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 08:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476689#M122685</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T08:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate how many arguments are in &amp;vector.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476690#M122686</link>
      <description>&lt;P&gt;I found the answer&lt;/P&gt;&lt;P&gt;%let n=%sysfunc(countw(&amp;amp;vector));&lt;BR /&gt;%put &amp;amp;n.;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 08:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476690#M122686</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T08:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculate how many arguments are in &amp;vector.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476691#M122687</link>
      <description>&lt;P&gt;Another way&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;nn=countw("&amp;amp;vector");&lt;BR /&gt;put nn=;&lt;BR /&gt;call symput ('nn',nn);&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;nn.;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 08:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476691#M122687</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T08:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculate how many arguments are in &amp;vector.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476693#M122688</link>
      <description>&lt;P&gt;other ways that are working well even if &amp;amp;vector. is empty&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%let n=%sysfunc(countw(&amp;amp;vector.,'+'));&lt;BR /&gt;%put &amp;amp;n.;&lt;BR /&gt;%let n=%sysfunc(countw(%str()&amp;amp;vector.));&lt;BR /&gt;%put &amp;amp;n.;&lt;BR /&gt;%let n=%sysfunc(countw(&amp;amp;vector.%str()));&lt;BR /&gt;%put &amp;amp;n.;&lt;BR /&gt;%let n=%sysfunc(countw(%str(&amp;amp;vector.)));&lt;BR /&gt;%put &amp;amp;n.;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 08:40:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/calculate-how-many-arguments-are-in-amp-vector/m-p/476693#M122688</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-07-10T08:40:36Z</dc:date>
    </item>
  </channel>
</rss>

