<?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: Array concept in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85670#M24513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That you want to multiply implies numeric values, however 19:40 is not a numeric value (unless we are seeing the formatted value).&amp;nbsp; This suggests that the incoming values are character and that you want to parse them and convert them to numeric.&amp;nbsp;&amp;nbsp; As DATA _NULL_ said show us what you hope to see as an outcome and especially pay attention to the numeric / character issue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 23:00:54 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2013-03-22T23:00:54Z</dc:date>
    <item>
      <title>Array concept</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85668#M24511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I i want to use array to scan cach observation and do a particular calculation if the condition is met...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition is that if the data is more than 3 decimals(2 decimals rather)&amp;nbsp; i want to do the calculation 60*60*24&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data is like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10.75&amp;nbsp;&amp;nbsp; 0.41875&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19&lt;STRONG&gt;:&lt;/STRONG&gt;40&amp;nbsp;&amp;nbsp; CU-O&lt;/P&gt;&lt;P&gt;When it scans this record only 0.41875 gets the calculation done&lt;/P&gt;&lt;P&gt;19:40 is in the &lt;STRONG&gt;time format(not decimal so no calculation done))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CU-O is some charecter data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lastly after it does the calculation only those need to be converted into time4. format???&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 13:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85668#M24511</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-03-22T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Array concept</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85669#M24512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the data type of these variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also give more sample data and the code to read it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 13:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85669#M24512</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-22T13:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Array concept</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85670#M24513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That you want to multiply implies numeric values, however 19:40 is not a numeric value (unless we are seeing the formatted value).&amp;nbsp; This suggests that the incoming values are character and that you want to parse them and convert them to numeric.&amp;nbsp;&amp;nbsp; As DATA _NULL_ said show us what you hope to see as an outcome and especially pay attention to the numeric / character issue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 23:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85670#M24513</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-22T23:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Array concept</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85671#M24514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK it sounded like fun so.&amp;nbsp; Assuming that all are character and they are to be converted to numeric.&amp;nbsp; Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;length val1-val4 $8;&lt;/P&gt;&lt;P&gt;input val1 val2 val3 val4;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;0.75&amp;nbsp;&amp;nbsp; 0.41875&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19:40&amp;nbsp;&amp;nbsp; CU-O&lt;/P&gt;&lt;P&gt;0.75&amp;nbsp;&amp;nbsp; 0.41875&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19:40&amp;nbsp;&amp;nbsp; CU-O&lt;/P&gt;&lt;P&gt;1.0&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.333&amp;nbsp;&amp;nbsp; xxxx&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 199&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.1212 yyyy&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array values {3} $ val1-val3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; array nums&amp;nbsp;&amp;nbsp; {3} num1 - num3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i = 1 to dim(values);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if index(values{i},':') then nums{i}=input(values{i},hhmmss.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if length(scan(values{i},2))&amp;gt;2 then nums{i}=input(values{i},best.)*60*60*24;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else nums{i}=input(values{i},best.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 23:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Array-concept/m-p/85671#M24514</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-22T23:10:59Z</dc:date>
    </item>
  </channel>
</rss>

