<?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 How to include a blank space in my output in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277612#M55762</link>
    <description>&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;By using the following code I need output for AESERN variable for observations 3 and 4 as Yes (1) and&amp;nbsp;Yes (1,2). But my output is without space between the 'YES' and parenthesis. Please help in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My output=&lt;SPAN&gt;Yes(1) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Yes(1,2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;input AESER $ AESDTH $ AESLIFE $ AESHOSP $ AESCONG $ AESDISAB $ AESMIE $ INFECDIS $;&lt;BR /&gt;datalines;&lt;BR /&gt;N N N N N N N N&lt;BR /&gt;Y N N N N N N N&lt;BR /&gt;Y Y N N N N N N&lt;BR /&gt;Y Y Y N N N N N&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data TWO;&lt;BR /&gt;length AESERN $20;&lt;BR /&gt;set one;&lt;BR /&gt;array AESP {7} $ AESDTH -- INFECDIS;&lt;BR /&gt;array POS {7} $1 ;&lt;BR /&gt;drop I POS:;&lt;BR /&gt;AESERN =ifc( AESER = 'N' , 'No', 'Yes');&lt;BR /&gt;if AESERN = 'Yes' and whichc('Y', of AESP[*]) then do;&lt;BR /&gt;do I = 1 to 7;&lt;BR /&gt;if AESP[I]='Y' then POS[I]=cat(I);&lt;BR /&gt;end;&lt;BR /&gt;AESERN = cats(AESERN, '(', catx(',', of POS[*]), ')');&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:59:53 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2016-06-15T16:59:53Z</dc:date>
    <item>
      <title>How to include a blank space in my output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277612#M55762</link>
      <description>&lt;P&gt;Dear ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;By using the following code I need output for AESERN variable for observations 3 and 4 as Yes (1) and&amp;nbsp;Yes (1,2). But my output is without space between the 'YES' and parenthesis. Please help in my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My output=&lt;SPAN&gt;Yes(1) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Yes(1,2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;input AESER $ AESDTH $ AESLIFE $ AESHOSP $ AESCONG $ AESDISAB $ AESMIE $ INFECDIS $;&lt;BR /&gt;datalines;&lt;BR /&gt;N N N N N N N N&lt;BR /&gt;Y N N N N N N N&lt;BR /&gt;Y Y N N N N N N&lt;BR /&gt;Y Y Y N N N N N&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data TWO;&lt;BR /&gt;length AESERN $20;&lt;BR /&gt;set one;&lt;BR /&gt;array AESP {7} $ AESDTH -- INFECDIS;&lt;BR /&gt;array POS {7} $1 ;&lt;BR /&gt;drop I POS:;&lt;BR /&gt;AESERN =ifc( AESER = 'N' , 'No', 'Yes');&lt;BR /&gt;if AESERN = 'Yes' and whichc('Y', of AESP[*]) then do;&lt;BR /&gt;do I = 1 to 7;&lt;BR /&gt;if AESP[I]='Y' then POS[I]=cat(I);&lt;BR /&gt;end;&lt;BR /&gt;AESERN = cats(AESERN, '(', catx(',', of POS[*]), ')');&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:59:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277612#M55762</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-06-15T16:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to include a blank space in my output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277626#M55769</link>
      <description>Hi, &lt;BR /&gt;  I suggest you look up the way that the CATS and CATX functions work. Specificatlly, for CATS, which is your outer function call. CATS will strip both leading and trailing blanks from the string being generated. You might want to investigate other functions. For example, the simple CAT function, which operates differently than CATS.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Wed, 15 Jun 2016 18:01:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277626#M55769</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-06-15T18:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to include a blank space in my output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277638#M55770</link>
      <description>&lt;P&gt;cats remove leading and trailing blank, catt remove trailing blank. So, try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AESERN = catt(AESERN, ' (', catx(',', of POS[*]), ')');&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:52:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277638#M55770</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2016-06-15T18:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to include a blank space in my output</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277662#M55776</link>
      <description>&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-include-a-blank-space-in-my-output/m-p/277662#M55776</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-06-15T19:56:54Z</dc:date>
    </item>
  </channel>
</rss>

