<?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: What is this strange “numeric” to “numeric” explicit conversion? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136831#M36898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... Unless you have used OPTIONS NONOTES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2014 21:17:08 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2014-01-09T21:17:08Z</dc:date>
    <item>
      <title>What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136827#M36894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi Forum,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;I was reviewing a code written by another coder where I found a statement highlighted by blue colour which looks strange (at least for me) but SAS does not complains.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; tt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;set t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;……..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;…….&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: aqua; color: black; font-size: 11pt;"&gt;Id_No=input(ID,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: aqua; font-family: 'Courier New';"&gt;12.&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: aqua; color: black; font-size: 11pt;"&gt;);&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;…………………&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;……………..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;“ID” is a numeric variable. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;After I have run the code, the new variable “Id_No” is created which is also a numeric variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;No complains in the log.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Q:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;What I have learned from the SAS class about explicit conversion is this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Numeric to character conversion =put(Nvar, numeric format)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Character to numeric conversion = input(Cvar, numeric informat)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;So, how could numeric to numeric happens like above?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Your help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Miris&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 20:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136827#M36894</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2014-01-09T20:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136828#M36895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure there are no complaints in the log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below step is like yours.&amp;nbsp; As you say, the INPUT() function expects a character argument.&amp;nbsp; SAS converts the numeric ID value to a character value (implicit coversion causing the NOTE: ), and then reads that character value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;29&amp;nbsp;&amp;nbsp; data a;
30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id=1;
31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id_no=input(id,12.);
32&amp;nbsp;&amp;nbsp; run;

NOTE: Numeric values have been converted to character values at the places given by:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Line):(Column).
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 31:15
NOTE: The data set WORK.A has 1 observations and 2 variables
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 20:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136828#M36895</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-01-09T20:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136829#M36896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure ID is a numeric variable?&lt;/P&gt;&lt;P&gt;Acording to the documentation the Input Function expects a character argument. See &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p19en16vskd2vhn1vwmxpxnglxxs.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p19en16vskd2vhn1vwmxpxnglxxs.htm"&gt;SAS(R) 9.3 Functions and CALL Routines: Reference&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 20:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136829#M36896</guid>
      <dc:creator>CTorres</dc:creator>
      <dc:date>2014-01-09T20:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136830#M36897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I do it it does complain.&amp;nbsp; So you are not telling the whole story.&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;18&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;19&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id = &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id_No=input(ID,&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;12.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;21&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;NOTE: &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;Numeric&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; values have been converted to character values at the places given by: (Line):(Column)&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;:&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;16&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 21:00:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136830#M36897</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-09T21:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136831#M36898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... Unless you have used OPTIONS NONOTES;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 21:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136831#M36898</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-01-09T21:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136832#M36899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I never would have found that "little" option on my own - thanks, PG!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 21:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136832#M36899</guid>
      <dc:creator>cwcaulkins</dc:creator>
      <dc:date>2014-01-09T21:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is this strange “numeric” to “numeric” explicit conversion?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136833#M36900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's handy when you want to render the LOG useless.&amp;nbsp; Or if you're programming for job security.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 21:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-this-strange-numeric-to-numeric-explicit-conversion/m-p/136833#M36900</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-09T21:41:01Z</dc:date>
    </item>
  </channel>
</rss>

