<?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 Transforming numeric to character, and indicating NULL characters, in DI Studio expressions in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121144#M1513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) I'm setting up mappings in the File Reader transformation. What kind of expression can I use to transform a numeric variable into a character variable? I tried &lt;STRONG&gt;put(varname, $6.)&lt;/STRONG&gt; without any success, and can't seem to find any solutions for the kind of syntax I need for typing expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When writing expressions, how do I indicate a blank character? I've tried &lt;STRONG&gt;varname IS NULL&lt;/STRONG&gt;, &lt;STRONG&gt;varname = NULL&lt;/STRONG&gt;, &lt;STRONG&gt;varname = ""&lt;/STRONG&gt;, and more, to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2012 13:23:53 GMT</pubDate>
    <dc:creator>TurnTheBacon</dc:creator>
    <dc:date>2012-09-13T13:23:53Z</dc:date>
    <item>
      <title>Transforming numeric to character, and indicating NULL characters, in DI Studio expressions</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121144#M1513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) I'm setting up mappings in the File Reader transformation. What kind of expression can I use to transform a numeric variable into a character variable? I tried &lt;STRONG&gt;put(varname, $6.)&lt;/STRONG&gt; without any success, and can't seem to find any solutions for the kind of syntax I need for typing expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When writing expressions, how do I indicate a blank character? I've tried &lt;STRONG&gt;varname IS NULL&lt;/STRONG&gt;, &lt;STRONG&gt;varname = NULL&lt;/STRONG&gt;, &lt;STRONG&gt;varname = ""&lt;/STRONG&gt;, and more, to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 13:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121144#M1513</guid>
      <dc:creator>TurnTheBacon</dc:creator>
      <dc:date>2012-09-13T13:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming numeric to character, and indicating NULL characters, in DI Studio expressions</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121145#M1514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Check this..&lt;/P&gt;&lt;P&gt;&lt;IMG alt="file.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2548_file.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;put(SERIAL_NO ,best.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="file1.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2550_file1.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt; case when varnum=''&amp;nbsp; then InstrumentID else varnum end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 16:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121145#M1514</guid>
      <dc:creator>shivas</dc:creator>
      <dc:date>2012-09-13T16:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming numeric to character, and indicating NULL characters, in DI Studio expressions</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121146#M1515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The result of a put() function is a string but you need to use a numeric format for numeric variables so something like "put(varname,6.)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most generic SAS syntax to check for missings is function "missing()" as it deals with both character and numeric variables. "missing()" returns a '1' (='true') it the variable is missing.&lt;/P&gt;&lt;P&gt;For simple If..then..else situations using coalesce() is often an alternative. coalesce() will pick the first non-missing value from a list of values&amp;nbsp; "coalesce(variable1,variable2,0)"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 03:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Transforming-numeric-to-character-and-indicating-NULL-characters/m-p/121146#M1515</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-09-14T03:25:00Z</dc:date>
    </item>
  </channel>
</rss>

