<?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 Two ways to split bar charts in SAS Visual Analytics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Two-ways-to-split-bar-charts-in-SAS-Visual-Analytics/m-p/314215#M68404</link>
    <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my data the following value is present. My code gave the output i need for all obs except this value. With the code the value is split into five variables rather than four. Please help in my code. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-conoooting current/active suooocts under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the sooject source documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this doooation to the OOO. The site staff will obtain the subject's re-consent during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The OOO reminded the site staff to work with the subject at their next Oooo 00-000 visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update 00JON2000).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;length temp $200;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;n+1;&lt;BR /&gt;do i=1 to countw(value,'');&lt;BR /&gt;temp=scan(value,i,' ');len=length(temp)+1;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data two;&lt;BR /&gt;set one;&lt;BR /&gt;by n;&lt;BR /&gt;retain sum;&lt;BR /&gt;if first.n then sum=0;&lt;BR /&gt;sum+len;&lt;BR /&gt;if sum gt 200 then do;group+1;sum=len;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data three;&lt;BR /&gt;length output $ 200;&lt;BR /&gt;do until(last.group);&lt;BR /&gt;set two;&lt;BR /&gt;by n group;&lt;BR /&gt;ouput=catx(' ',output,temp);&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output needed;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-consenting current/active subjects under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the subject source &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this deviation to the OOO. The site staff will obtain the subject's re-consent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The OOO reminded the site staff to work with the subject at their next Oooo 00-000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update 00JON2000).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output getting;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-consenting current/active subjects under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the subject source&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this deviation to the OOO. The site staff will obtain the subject's&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;re-consent during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The CRA reminded the site staff to work with the subject at their next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Oooo 00-000 visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;value5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;21JUN2016).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Nov 2016 06:38:20 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2016-11-25T06:38:20Z</dc:date>
    <item>
      <title>Two ways to split bar charts in SAS Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-ways-to-split-bar-charts-in-SAS-Visual-Analytics/m-p/314215#M68404</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my data the following value is present. My code gave the output i need for all obs except this value. With the code the value is split into five variables rather than four. Please help in my code. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-conoooting current/active suooocts under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the sooject source documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this doooation to the OOO. The site staff will obtain the subject's re-consent during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The OOO reminded the site staff to work with the subject at their next Oooo 00-000 visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update 00JON2000).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data one;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;length temp $200;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;n+1;&lt;BR /&gt;do i=1 to countw(value,'');&lt;BR /&gt;temp=scan(value,i,' ');len=length(temp)+1;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data two;&lt;BR /&gt;set one;&lt;BR /&gt;by n;&lt;BR /&gt;retain sum;&lt;BR /&gt;if first.n then sum=0;&lt;BR /&gt;sum+len;&lt;BR /&gt;if sum gt 200 then do;group+1;sum=len;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data three;&lt;BR /&gt;length output $ 200;&lt;BR /&gt;do until(last.group);&lt;BR /&gt;set two;&lt;BR /&gt;by n group;&lt;BR /&gt;ouput=catx(' ',output,temp);&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output needed;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value1&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-consenting current/active subjects under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the subject source &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this deviation to the OOO. The site staff will obtain the subject's re-consent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The OOO reminded the site staff to work with the subject at their next Oooo 00-000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update 00JON2000).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output getting;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The OOO re-trained the site staff on re-consenting current/active subjects under the updated main OOO at screening. The site staff printed out the updated OOO and included it in the subject source&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;documents with a note to use the OOO at the subject's next site visit. The site staff created a note-to-file and reported this deviation to the OOO. The site staff will obtain the subject's&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;re-consent during their next visit for the Oooo 00-000 study. The OOO will verify the OOO has been completed at the next OOO. The CRA reminded the site staff to work with the subject at their next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;value4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Oooo 00-000 visit to obtain the missing consent signature, otherwise the site staff should document/update their note to file in source to reflect in the inability to obtain the signature (update&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;value5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;21JUN2016).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 06:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-ways-to-split-bar-charts-in-SAS-Visual-Analytics/m-p/314215#M68404</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-11-25T06:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Two ways to split bar charts in SAS Visual Analytics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-ways-to-split-bar-charts-in-SAS-Visual-Analytics/m-p/316229#M69073</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see what the issue is in your code and the answer is quite simple.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are splitting the text into new variables with a length of 200 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you breakdown the text into single words you add 1 to the length of each word to allow for the space between that word and the next, which is absolutely correct.&lt;/P&gt;
&lt;P&gt;However, when you group the words in dataset two, the second data step, you check if the total length of the group is more than 200 but this should be more than 201 as you need to allow for the space on the end of the last word!&lt;/P&gt;
&lt;P&gt;If you change the line:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt; &lt;SPAN&gt;if sum gt 200 then do;group+1;sum=len;end;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;if sum gt 201 then do;group+1;sum=len;end;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;you will get the results you desire (as long as you correct the mistyped &lt;FONT color="#0000FF"&gt;ouput=&lt;/FONT&gt; to &lt;FONT color="#0000FF"&gt;output=&lt;/FONT&gt; in the third data step!).&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Chris&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 12:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-ways-to-split-bar-charts-in-SAS-Visual-Analytics/m-p/316229#M69073</guid>
      <dc:creator>rivieralad</dc:creator>
      <dc:date>2016-12-02T12:12:00Z</dc:date>
    </item>
  </channel>
</rss>

