<?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: Standard and nonstandard in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548127#M74419</link>
    <description>&lt;P&gt;No. They are numeric variables unless you specify otherwise. In the code below they are character (notice the $).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And regarding your question: Run it and see? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.input;
input Deposit $ Amount $;
datalines;
1 10,000.00
2 $3.4k
3 $9.3e3
4 $7500
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Apr 2019 07:40:45 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-04-03T07:40:45Z</dc:date>
    <item>
      <title>Standard and nonstandard</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548124#M74418</link>
      <description>&lt;P&gt;&lt;SPAN&gt;data work.input;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;input Deposit Amount;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;datalines;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 10,000.00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 $3.4k&lt;/SPAN&gt;&lt;SPAN class="text_exposed_show"&gt;&lt;BR /&gt;3 $9.3e3&lt;BR /&gt;4 $7500&lt;BR /&gt;;&lt;BR /&gt;data work.output;&lt;BR /&gt;set work.input;&lt;BR /&gt;Num_Amout=input(amount,comma9.);&lt;BR /&gt;run;&lt;BR /&gt;What output will be created by this program, Deposit and amount are character variable?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 07:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548124#M74418</guid>
      <dc:creator>swayto</dc:creator>
      <dc:date>2019-04-03T07:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Standard and nonstandard</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548127#M74419</link>
      <description>&lt;P&gt;No. They are numeric variables unless you specify otherwise. In the code below they are character (notice the $).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And regarding your question: Run it and see? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.input;
input Deposit $ Amount $;
datalines;
1 10,000.00
2 $3.4k
3 $9.3e3
4 $7500
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2019 07:40:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548127#M74419</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-04-03T07:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Standard and nonstandard</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548144#M74421</link>
      <description>&lt;P&gt;A clear case for Maxim 4. Simply try it.&lt;/P&gt;
&lt;P&gt;Then apply Maxim 2 (Read the Log), and then Maxim 3 (Know Your Data). Inspect the columns in the data grid, or run a proc contents.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will note that your first step results in missing values only for amount because you have 4 different ways of providing numeric data, all 4 of which are not covered by the default informat for numbers.&lt;/P&gt;
&lt;P&gt;So you'll probably end up with reading that column as character and then doing a conditional conversion, depending on certain markers found in the string.&lt;/P&gt;
&lt;P&gt;An example that works for your 4 datalines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.input;
input Deposit _Amount :$15.;
_amount = compress(_amount,'$,');
if substr(_amount,length(_amount),1) = 'k'
then amount = input(substr(_amount,1,length(_amount)-1),best15.) * 1000;
else amount = input(_amount,best15.);
datalines;
1 10,000.00
2 $3.4k
3 $9.3e3
4 $7500
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2019 09:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Standard-and-nonstandard/m-p/548144#M74421</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-03T09:45:55Z</dc:date>
    </item>
  </channel>
</rss>

