<?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: SAS Array coding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624785#M184088</link>
    <description>&lt;P&gt;Like this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input id who_reacted_1 who_reacted_2  who_reacted_3  who_reacted_4 who_reacted_5;
	datalines;
1 5556 5555 5555 5557 5555
;
run;    

data want;
	set have;
	array who_reacted_(5);
	do i=1 to dim(who_reacted_);
		if who_reacted_(i) = 5555 then count+1;
	end;
	drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Feb 2020 11:18:02 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-02-14T11:18:02Z</dc:date>
    <item>
      <title>SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624783#M184087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have dataset with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;who_reacted_1 &amp;nbsp; who_reacted_2----so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;1. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 5556 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5555 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to calculate total number of who_reacted-if ID is 5555&amp;nbsp;&lt;/P&gt;&lt;P&gt;who_reacted_1&lt;/P&gt;&lt;PRE class="language-sas lia-code-sample"&gt;&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 11:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624783#M184087</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T11:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624785#M184088</link>
      <description>&lt;P&gt;Like this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input id who_reacted_1 who_reacted_2  who_reacted_3  who_reacted_4 who_reacted_5;
	datalines;
1 5556 5555 5555 5557 5555
;
run;    

data want;
	set have;
	array who_reacted_(5);
	do i=1 to dim(who_reacted_);
		if who_reacted_(i) = 5555 then count+1;
	end;
	drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Feb 2020 11:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624785#M184088</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-14T11:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624815#M184099</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Do you how to include multiple ID's in the statement below-5555,5556,5557,&lt;/P&gt;&lt;P&gt;I am getting an error.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="token keyword" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt; who_reacted_&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;i&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token operator" style="box-sizing: inherit; color: #a67f59; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token number" style="box-sizing: inherit; color: #008080; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;5555&lt;/SPAN&gt; &lt;SPAN class="token keyword" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;then&lt;/SPAN&gt; &lt;SPAN class="token function" style="box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;count&lt;/SPAN&gt;&lt;SPAN class="token operator" style="box-sizing: inherit; color: #a67f59; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;+&lt;/SPAN&gt;&lt;SPAN class="token number" style="box-sizing: inherit; color: #008080; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;&lt;BR /&gt;end&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token keyword" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt; I&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624815#M184099</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T13:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624827#M184100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/176514"&gt;@knargis160&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean this ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input who_reacted_1 who_reacted_2  who_reacted_3  who_reacted_4 who_reacted_5;
	datalines;
5556 5555 5555 5557 5555
;
run;    


data want;
	set have;
	array who_reacted_(5);
	do i=1 to dim(who_reacted_);
		if who_reacted_(i) in (5555,5556,5557) then count+1;
	end;
	drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624827#M184100</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-14T13:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624831#M184101</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works but no error in coding but I am not getting actual number of reactions instead it is count from 1 to 30 observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624831#M184101</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T13:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624833#M184103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/176514"&gt;@knargis160&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please share some sample data as well as the expected output?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624833#M184103</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-14T13:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624834#M184104</link>
      <description>&lt;P&gt;Hi sample data looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token keyword" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: blue; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt; who_reacted_1 who_reacted_2&amp;nbsp; who_reacted_3&amp;nbsp; who_reacted_4 who_reacted_5.... who_reacted_40&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token keyword" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: blue; line-height: 1.2;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; line-height: 1.2;"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;&lt;BR /&gt;5556 5555 5555 5557 5555&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;5556&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;5555 5556&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;5557&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;Output: Count&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;3... so on with code. It was working for single ID.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;Does this makes more sense?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624834#M184104</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T13:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624836#M184105</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/176514"&gt;@knargis160&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this better ?&lt;/P&gt;
&lt;P&gt;-&amp;gt; count will give you the number of 'columns' who-react that were in 555 556 and 5557 for each row.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	infile datalines dlm=" " dsd truncover;
	input who_reacted_1 who_reacted_2  who_reacted_3  who_reacted_4 who_reacted_5;
	datalines;
5556    
5555 5556 5554 5557
5557 5554
;
run;    

data want;
	set have;
	array who_reacted_(5);
	count=0;
	do i=1 to dim(who_reacted_);
		if who_reacted_(i) in (5555,5556,5557) then count+1;
	end;
	drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Feb 2020 13:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624836#M184105</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-14T13:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624843#M184107</link>
      <description>&lt;P&gt;How did you get counts of 1,2,3?&amp;nbsp; I see counts of 5,1,2,1.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 14:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624843#M184107</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-14T14:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624871#M184124</link>
      <description>&lt;P&gt;Thanks it worked out&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 15:48:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/624871#M184124</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-14T15:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628253#M185603</link>
      <description>&lt;P&gt;I want to transpose the data&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;PTID who_reacted_1 who_reacted_2&amp;nbsp; who_reacted_3&amp;nbsp; who_reacted_4 who_reacted_5&lt;/SPAN&gt;&lt;SPAN class="token punctuation" style="box-sizing: inherit; color: #999999; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: black; direction: ltr; font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace; font-size: 1em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; -ms-hyphens: none; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px white; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: normal; word-spacing: normal;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;1 5556&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;2 5555 5556 5554 5557&lt;BR /&gt;3. 5557 5554&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token datalines" style="background-attachment: scroll; background-clip: border-box; background-color: #ffffc0; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; box-sizing: inherit; color: #dd4a68; font-family: Consolas,Monaco,&amp;amp;quot; andale mono&amp;amp;quot;,&amp;amp;quot;ubuntu mono&amp;amp;quot;,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.2; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;&lt;SPAN class="token data string" style="box-sizing: inherit; color: maroon; line-height: 1.2;"&gt;I want to have the data like&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1. 5556&lt;/P&gt;&lt;P&gt;2. 5555&lt;/P&gt;&lt;P&gt;2. 5556&lt;/P&gt;&lt;P&gt;2.5554&lt;/P&gt;&lt;P&gt;2. 5557&lt;/P&gt;&lt;P&gt;Can you suggest a best way to figure that out?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628253#M185603</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-28T16:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628257#M185607</link>
      <description>&lt;P&gt;So if you have data like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input PTID who_reacted_1-who_reacted_5;
cards;
1 5556 . . . .   
2 5555 5556 5554 5557 .
3 5557 5554 . . . 
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You just need to use BY statement in the PROC transpose.&amp;nbsp; To get rid of the empty cells you can use a WHERE= dataset option on the output dataset.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tranpose data=have out=want (where=(not missing(col1));
  by ptid;
  var who_reacted_1-who_reacted_5;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628257#M185607</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-28T16:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628260#M185610</link>
      <description>&lt;P&gt;Some how I am having col2, col3 as well. Do you know why&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628260#M185610</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-28T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628266#M185615</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/176514"&gt;@knargis160&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Some how I am having col2, col3 as well. Do you know why&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your BY variables do not uniquely identify the observations in your original dataset.&amp;nbsp; You might have to add a new variable first if there is no combination of variables that work.&amp;nbsp; Note you could actually use your first analysis variable and then just drop it from the output dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or just use the ARRAY method.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data want;
  set have;
  array who_reacted_[5]  ;
  do idx=1 to dim(who_reacted_);
    value = who_reacted_[idx] ;
    if not missing(value) then output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628266#M185615</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-28T16:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Array coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628275#M185620</link>
      <description>&lt;P&gt;Thanks it worked!&lt;/P&gt;&lt;P&gt;Do you know if I can categorize in these ID's in array statement&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Array-coding/m-p/628275#M185620</guid>
      <dc:creator>knargis160</dc:creator>
      <dc:date>2020-02-28T16:44:10Z</dc:date>
    </item>
  </channel>
</rss>

