<?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: Differences between $w. informat and $charw. informat? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199326#M266665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah yes.&amp;nbsp; Some functions for instance, take length() will return 1 on empty strings.&amp;nbsp; Lengthn() for the same one will return 0.&amp;nbsp; Same with these, an empty string within $char, will have one " " space character, where $w will not="".&amp;nbsp; They are useful in specific circumstances.&amp;nbsp; TBH in 99% of the time your likely to want to see "" rather than " ", which is why I can't remember ever using $char.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2015 09:36:52 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-07-09T09:36:52Z</dc:date>
    <item>
      <title>Differences between $w. informat and $charw. informat?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199322#M266661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, What is the difference between $w. informat and $charw. informat? Does it have different functionality? To me it seems $w. works fine reading a character value and I just can't undertsand the $charw.. Please help. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 07:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199322#M266661</guid>
      <dc:creator>CharlotteCain</dc:creator>
      <dc:date>2015-07-09T07:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between $w. informat and $charw. informat?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199323#M266662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt;If there is a period in the input field, which is declared as $charw. informat then the period is assigned as a value to the input field&lt;/P&gt;&lt;P&gt;where as in case of $w. the period is stored as blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt;One more difference is $charw. wont trim the leading blank spaces where as $w. will trim the leading blank spaces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data charw;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input char $char5.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="7" cellspacing="1" class="Table" frame="box" rules="groups" summary="Procedure Print: Data Set WORK.CHARW"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH class="r RowHeader" scope="row"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TD class="l Data"&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="r RowHeader" scope="row"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TD class="l Data"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;data w;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;input w $5.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;proc print;run;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE cellpadding="7" cellspacing="1" class="Table" frame="box" rules="groups" summary="Procedure Print: Data Set WORK.W"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH class="r RowHeader" scope="row"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TD class="l Data"&gt;&lt;STRONG&gt;char&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH class="r RowHeader" scope="row"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TD class="l Data"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data charw;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input char&amp;nbsp; $char8.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call symput("char",char);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; char&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data w;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input w $8.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call symput("w",w);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; char&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In the above two datasets there are 3 blank spaces before the value "char"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%put charw usage - There will be blank spaces after abc :&amp;nbsp; abc&amp;amp;char;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%put w usage - There wont be any blank spaces after abc : abc&amp;amp;w;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%put charw usage - There will be blank spaces after abc :&amp;nbsp; abc&amp;amp;char;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;charw usage - There will be blank spaces after abc :&amp;nbsp; abc&amp;nbsp;&amp;nbsp; char&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; %put w usage - There wont be any blank spaces after abc : abc&amp;amp;w;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;w usage - There wont be any blank spaces after abc : abcchar&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 08:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199323#M266662</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-07-09T08:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between $w. informat and $charw. informat?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199324#M266663</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;Its in the online documentation:&lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0" style="font-size: 13.4399995803833px; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #000000; background-color: #ffffff;" width="100%"&gt;&lt;TBODY style="font-family: inherit;"&gt;&lt;TR style="font-family: inherit;" valign="top"&gt;&lt;TD class="title2" style="font-weight: bold; font-size: 16.1279983520508px; margin-top: 1.4em;"&gt;&lt;A name="a000301716" style="font-size: 16.1279983520508px;"&gt;Comparisons&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin: 1.4em 0 0; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #000000; font-size: 13.4399995803833px; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="margin: 1.4em 0 0; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; color: #000000; font-size: 13.4399995803833px; background-color: #ffffff;"&gt;&lt;A name="a000849829" style="font-family: inherit;"&gt;&lt;/A&gt;The $&lt;SPAN class="emph" style="font-style: italic;"&gt;w&lt;/SPAN&gt;. informat is almost identical to the $CHAR&lt;SPAN class="emph" style="font-style: italic;"&gt;w&lt;/SPAN&gt;. informat. However, $CHAR&lt;SPAN class="emph" style="font-style: italic;"&gt;w&lt;/SPAN&gt;. does not trim leading blanks nor does it convert a single period in an input field to a blank, while $&lt;SPAN class="emph" style="font-style: italic;"&gt;w&lt;/SPAN&gt;. does both.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 08:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199324#M266663</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-09T08:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between $w. informat and $charw. informat?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199325#M266664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert, Sorry to waste your time, and yes that's the part I am finding it difficult to understand. Trim leading blanks. For a blind eye, does SAS pad blanks per byte? I am not getting the notion of recognising a leading or trailing blank. I would like to visualise an image.&lt;/P&gt;&lt;P&gt;the following test&lt;/P&gt;&lt;P&gt;data j;&lt;/P&gt;&lt;P&gt;a='&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ';&lt;/P&gt;&lt;P&gt;a1='';&lt;/P&gt;&lt;P&gt;k=length(a);&lt;/P&gt;&lt;P&gt;k1=length(a1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;length results are the same. Where am i lacking?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 09:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199325#M266664</guid>
      <dc:creator>CharlotteCain</dc:creator>
      <dc:date>2015-07-09T09:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Differences between $w. informat and $charw. informat?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199326#M266665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah yes.&amp;nbsp; Some functions for instance, take length() will return 1 on empty strings.&amp;nbsp; Lengthn() for the same one will return 0.&amp;nbsp; Same with these, an empty string within $char, will have one " " space character, where $w will not="".&amp;nbsp; They are useful in specific circumstances.&amp;nbsp; TBH in 99% of the time your likely to want to see "" rather than " ", which is why I can't remember ever using $char.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 09:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Differences-between-w-informat-and-charw-informat/m-p/199326#M266665</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-07-09T09:36:52Z</dc:date>
    </item>
  </channel>
</rss>

