<?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: How to declare an array with decimal datatype? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617710#M181055</link>
    <description>&lt;P&gt;As well as posting your code as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;advised, if you are getting any error or warning messages then please also post your log showing the code executing and the messages generated, using the "Insert Code" icon (denoted by "{i}").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 09:09:13 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2020-01-16T09:09:13Z</dc:date>
    <item>
      <title>How to declare an array with decimal datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617700#M181050</link>
      <description>&lt;P&gt;I have been trying to Declare an array which will be populated with values such as (0.00,25.88,25.10) ,&lt;/P&gt;&lt;P&gt;My declaration Looks like:&amp;nbsp; ARRAY CP_COB_REMAINING_PAT_LBLTY_AMT {9} 8.2 CP_COB_REMAINING_PAT_LBLTY_AMT1 - CP_COB_REMAINING_PAT_LBLTY_AMT9;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After this i am iterating over the aaray and assigning values from my input variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 07:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617700#M181050</guid>
      <dc:creator>Anmolkhandelwal</dc:creator>
      <dc:date>2020-01-16T07:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to declare an array with decimal datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617703#M181051</link>
      <description>&lt;P&gt;Please post the code using the running-man icon and post the complete data step. From the documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="xisDoc-example"&gt;
&lt;H3 id="p02yqqyhhb9pq4n1jc599h5mnpc8" class="xisDoc-title" tabindex="-1"&gt;Example 2: Assigning Initial Numeric Values&lt;/H3&gt;
&lt;P class="xisDoc-paragraph"&gt;These examples show how to define an array and assign initial numeric values to the elements in the array.&lt;/P&gt;
&lt;UL class="xisDoc-listUnordered"&gt;
&lt;LI class="xisDoc-item"&gt;
&lt;PRE class="xisDoc-codeFragmentOnly"&gt;&lt;CODE&gt;array test{4} t1 t2 t3 t4 (90 80 70 70);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;
&lt;PRE class="xisDoc-codeFragmentOnly"&gt;&lt;CODE&gt;array test{4} t1-t4 (90 80 2*70);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI class="xisDoc-item"&gt;
&lt;PRE class="xisDoc-codeFragmentOnly"&gt;&lt;CODE&gt;array test{4} _TEMPORARY_ (90 80 70 70);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 07:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617703#M181051</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-01-16T07:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to declare an array with decimal datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617710#M181055</link>
      <description>&lt;P&gt;As well as posting your code as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;advised, if you are getting any error or warning messages then please also post your log showing the code executing and the messages generated, using the "Insert Code" icon (denoted by "{i}").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 09:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617710#M181055</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2020-01-16T09:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to declare an array with decimal datatype?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617713#M181057</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;My declaration Looks like:&amp;nbsp; ARRAY CP_COB_REMAINING_PAT_LBLTY_AMT {9} &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;8.2&lt;/FONT&gt;&lt;/STRONG&gt; CP_COB_REMAINING_PAT_LBLTY_AMT1 - CP_COB_REMAINING_PAT_LBLTY_AMT9;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/269825"&gt;@Anmolkhandelwal&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue with your array declaration is that you specify a &lt;EM&gt;format&lt;/EM&gt; (8.2) where SAS expects a &lt;EM&gt;length&lt;/EM&gt; specification (in your case: 8). Since 8 (bytes) is the default length and numeric is the default type of variables you can even omit this length specification. Also the list of variable names is redundant in your example and can be omitted because an array of the form &lt;FONT face="courier new,courier"&gt;&lt;EM&gt;arrayname&lt;/EM&gt;[&lt;EM&gt;N&lt;/EM&gt;]&lt;/FONT&gt; consists of variables named &lt;FONT face="courier new,courier"&gt;&lt;EM&gt;arrayname1-arraynameN&lt;/EM&gt;&lt;/FONT&gt;&amp;nbsp;by default. Remember that there is no "decimal datatype" for variables in SAS datasets. For numbers of all kinds there is only one variable type "numeric" (as opposed to "character").&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 09:47:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-declare-an-array-with-decimal-datatype/m-p/617713#M181057</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-01-16T09:47:57Z</dc:date>
    </item>
  </channel>
</rss>

