<?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: proc tranwrd in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81285#M17503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jul 2013 18:37:37 GMT</pubDate>
    <dc:creator>sasuser1000</dc:creator>
    <dc:date>2013-07-16T18:37:37Z</dc:date>
    <item>
      <title>proc tranwrd</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81282#M17500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tI have several sequences,&lt;/P&gt;&lt;P&gt;I want to replace part of my sequence with a txt but for some reson the&amp;nbsp; full sequence is replaced&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so for example&lt;/P&gt;&lt;P&gt;replace this 1111 with dir4_&lt;/P&gt;&lt;P&gt;so for the sequence&amp;nbsp; 11110 the result should be equal to dir4_0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO MANIP(STATE);&lt;/P&gt;&lt;P&gt;x1=cat(cat(&amp;amp;state,4),'_'); /*the value of this is dir4_*/&lt;/P&gt;&lt;P&gt;=tranwrd(test,"1111",x1); /*test =11110 and it's a char*/&lt;/P&gt;&lt;P&gt;%MEND&lt;/P&gt;&lt;P&gt;%MANIP('DIR')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of&amp;nbsp; dir4_0 the result is dir4_&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 16:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81282#M17500</guid>
      <dc:creator>sasuser1000</dc:creator>
      <dc:date>2013-07-16T16:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc tranwrd</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81283#M17501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;X1 is 200 characters long padded by blanks so after the replacement from X1 there are blanks and the resultant _0 is pushed outside of the limit default 200 characters.&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;=tranwrd(test,"1111",strip(x1)); /* and shouldn't there be a variable on the left of the =*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 17:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81283#M17501</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-07-16T17:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc tranwrd</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81284#M17502</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;The code that was posted would not run as is so I made a few amendments whilst trying to keep the code as close to the original.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the issue is to do with the &lt;SPAN style="font-family: 'courier new', courier;"&gt;cat&lt;/SPAN&gt; function returning a string of length 32,767. So using the &lt;SPAN style="font-family: 'courier new', courier;"&gt;trim&lt;/SPAN&gt; function I believe helps find the required value for x2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%MACRO MANIP(STATE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; test ='11110';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; x1=cat(cat(&amp;amp;state,4),'_'); /*the value of this is dir4_*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; x2=tranwrd(test,"1111",trim(x1)); /*test =11110 and it's a char*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%MEND;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %MANIP('DIR');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put _all_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 17:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81284#M17502</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2013-07-16T17:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc tranwrd</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81285#M17503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 18:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tranwrd/m-p/81285#M17503</guid>
      <dc:creator>sasuser1000</dc:creator>
      <dc:date>2013-07-16T18:37:37Z</dc:date>
    </item>
  </channel>
</rss>

