<?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 Unintended trailing space created in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719260#M222691</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I use the code below to create temporary command and it create a trailing space in the id value.&lt;/P&gt;
&lt;P&gt;it should be like&lt;/P&gt;
&lt;P&gt;id='F2_w1_w2_N_3109';&amp;nbsp; &amp;nbsp;instead of&lt;/P&gt;
&lt;P&gt;id=&lt;U&gt;'F2_w1_w2_N_3109 '&lt;/U&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The temporary full command is below&lt;/P&gt;
&lt;P&gt;IF brk25_roc94 =0 then do; id=&lt;U&gt;'F2_w1_w2_N_3109 '&lt;/U&gt;; output;end;&lt;BR /&gt;IF brk25_roc94 =0 then do; id='F2_w1_w2_N_3107 '; output;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to avoid that space?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tmp temp;
data null;
set setupid_check end=last_cond;
file tmp;
put 'IF ' a_name '=' a_value  ' then do; id=' "'" id "'"	'; output;end;' ;
options source2;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Feb 2021 03:59:23 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2021-02-15T03:59:23Z</dc:date>
    <item>
      <title>Unintended trailing space created</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719260#M222691</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I use the code below to create temporary command and it create a trailing space in the id value.&lt;/P&gt;
&lt;P&gt;it should be like&lt;/P&gt;
&lt;P&gt;id='F2_w1_w2_N_3109';&amp;nbsp; &amp;nbsp;instead of&lt;/P&gt;
&lt;P&gt;id=&lt;U&gt;'F2_w1_w2_N_3109 '&lt;/U&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The temporary full command is below&lt;/P&gt;
&lt;P&gt;IF brk25_roc94 =0 then do; id=&lt;U&gt;'F2_w1_w2_N_3109 '&lt;/U&gt;; output;end;&lt;BR /&gt;IF brk25_roc94 =0 then do; id='F2_w1_w2_N_3107 '; output;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any way to avoid that space?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tmp temp;
data null;
set setupid_check end=last_cond;
file tmp;
put 'IF ' a_name '=' a_value  ' then do; id=' "'" id "'"	'; output;end;' ;
options source2;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 03:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719260#M222691</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2021-02-15T03:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unintended trailing space created</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719263#M222692</link>
      <description>&lt;P&gt;On the one hand, it's difficult to imagine how a trailing space will hurt anything.&amp;nbsp; If the length of ID is set anyplace in the code, that length will be in effect whether there is a trailing space or not.&amp;nbsp; However, you can get rid of it if needed by changing this line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put 'IF ' a_name '=' a_value  ' then do; id=' "'" id "'"	';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To remove the trailing space, back up and write over it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put 'IF ' a_name '=' a_value  ' then do; id=' "'" id +(-1) "'"	';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 04:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719263#M222692</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-02-15T04:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Unintended trailing space created</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719268#M222695</link>
      <description>&lt;P&gt;Another method if the trailing increases by 1,2 or unknown spaces:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data setupid_check;
	a_name = 'brk25_roc94';
	id = 'F2_w1_w2_N_3107';
	a_value = 0;
run;

data null;
	set setupid_check (rename=(id = id_)) end=last_cond;
	id = cats("'",id_,"'");
	file print;
	put 'IF ' a_name '=' a_value  ' then do; id=' id	'; output;end;';
	options source2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2021 05:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719268#M222695</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-02-15T05:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unintended trailing space created</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719317#M222719</link>
      <description>put 'IF ' a_name '=' a_value  ' then do; id=' "'"        id   +(-1)     "'"	'; output;end;' ;</description>
      <pubDate>Mon, 15 Feb 2021 11:39:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719317#M222719</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-15T11:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unintended trailing space created</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719452#M222756</link>
      <description>&lt;P&gt;Thank you everyone for helping.&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unintended-trailing-space-created/m-p/719452#M222756</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2021-02-15T19:12:58Z</dc:date>
    </item>
  </channel>
</rss>

