<?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: Numeric to character conversion notes in sas log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528987#M144458</link>
    <description>Thank you Kurt. I am using call symputx since the third parameter G makes the variable to be in Global table. Is my understanding correct ?</description>
    <pubDate>Tue, 22 Jan 2019 06:38:50 GMT</pubDate>
    <dc:creator>Jagadeesh2907</dc:creator>
    <dc:date>2019-01-22T06:38:50Z</dc:date>
    <item>
      <title>Numeric to character conversion notes in sas log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528775#M144351</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to execute the code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data sample;&lt;BR /&gt;input @3 tlr_table_name :$30.&lt;BR /&gt;tlr_date :yymmdd10.&lt;BR /&gt;tlr_time :hhmmss8.&lt;BR /&gt;tlr_record_count :6.;&lt;/P&gt;&lt;P&gt;cnt_trl + 1;&lt;BR /&gt;call symputx("sox_bsac_cnt",tlr_record_count,g);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when running the code i am getting the below note in the log and points to the call symput line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can clearly see because the variable "&lt;SPAN&gt;tlr_record_count" is numeric and we are assigning it to a macro, sas is doing the conversion and displaying the note. I changed the call symput like below, but i still get the same message.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;call symputx("sox_bsac_cnt",put(tlr_record_count,6.),g);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you help me understand this why and also let me know how i can overcome this note.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528775#M144351</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2019-01-21T14:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character conversion notes in sas log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528779#M144352</link>
      <description>&lt;P&gt;If you are using call symputx,&amp;nbsp;&amp;nbsp;If&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="strongEmph"&gt;value&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is numeric, SAS converts the value to a character string using the BEST. format and &lt;STRONG&gt;does not issue a note to the SAS log.&lt;/STRONG&gt; Leading and trailing blanks are removed, and the resulting character string is assigned to the macro variable. --Reference SAS documentation&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Posting some sample data woud help to test.&lt;/P&gt;
&lt;P&gt;Try this slight modification&amp;nbsp;&lt;STRONG&gt; 'g' in quotes&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;call symputx("sox_bsac_cnt",tlr_record_count,'&lt;STRONG&gt;g'&lt;/STRONG&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:54:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528779#M144352</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-21T14:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character conversion notes in sas log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528780#M144353</link>
      <description>&lt;P&gt;The problem is not with the data you want to put into the macro variable, but with the third argument to call symputx:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx("sox_bsac_cnt",tlr_record_count,g);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;g is obviously not a string literal, but a variable name; since this variable is not defined anywhere else, it is created as numeric with a missing value.&lt;/P&gt;
&lt;P&gt;You want to specifiy a string literal:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx("sox_bsac_cnt",tlr_record_count,'g');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528780#M144353</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-01-21T15:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character conversion notes in sas log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528987#M144458</link>
      <description>Thank you Kurt. I am using call symputx since the third parameter G makes the variable to be in Global table. Is my understanding correct ?</description>
      <pubDate>Tue, 22 Jan 2019 06:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528987#M144458</guid>
      <dc:creator>Jagadeesh2907</dc:creator>
      <dc:date>2019-01-22T06:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric to character conversion notes in sas log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528988#M144459</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107894"&gt;@Jagadeesh2907&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you Kurt. I am using call symputx since the third parameter G makes the variable to be in Global table. Is my understanding correct ?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes. Just make 'g' a string to make it work.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 06:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-to-character-conversion-notes-in-sas-log/m-p/528988#M144459</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-01-22T06:43:42Z</dc:date>
    </item>
  </channel>
</rss>

