<?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: TRANWRD funtion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53449#M11281</link>
    <description>Again, please share whatever SAS code you might be using, ideally in the form of a SAS log pasted in your post reply.&lt;BR /&gt;
&lt;BR /&gt;
Also, consider that you appear to be using TRANWRD with something other than a "character" string -- I don't see why you would want to use TRANWRD with a SAS numeric DATE variable.&lt;BR /&gt;
&lt;BR /&gt;
Can you convey what it is that you want to accomplish, with both INPUT and OUTPUT data examples, representing your object?&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 20 Jul 2010 19:19:23 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-07-20T19:19:23Z</dc:date>
    <item>
      <title>TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53448#M11280</link>
      <description>Hi all! &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have an issue when the Tranwrd function is passed dates. Though the input to the Tranwrd is 7/14/09 , the output is 71409. The same thing happens with brackets.If the input text has some brackets, the output does not have them. &lt;BR /&gt;
&lt;BR /&gt;
Is there any way to solve this? &lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Tue, 20 Jul 2010 18:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53448#M11280</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-20T18:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53449#M11281</link>
      <description>Again, please share whatever SAS code you might be using, ideally in the form of a SAS log pasted in your post reply.&lt;BR /&gt;
&lt;BR /&gt;
Also, consider that you appear to be using TRANWRD with something other than a "character" string -- I don't see why you would want to use TRANWRD with a SAS numeric DATE variable.&lt;BR /&gt;
&lt;BR /&gt;
Can you convey what it is that you want to accomplish, with both INPUT and OUTPUT data examples, representing your object?&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 20 Jul 2010 19:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53449#M11281</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-20T19:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53450#M11282</link>
      <description>This is my sas code:&lt;BR /&gt;
25   data MYDATA.e_final;&lt;BR /&gt;
26   set mydata.e_join;&lt;BR /&gt;
27   array fld_nm_var (*) attr: ;&lt;BR /&gt;
28   array fld_txt_var(*) fld:;&lt;BR /&gt;
29   do i=1 to dim(fld_nm_var);&lt;BR /&gt;
30   fld_txt = fld_txt_var(i);&lt;BR /&gt;
31   put fld_txt;&lt;BR /&gt;
32   fld_name = fld_nm_var(i);&lt;BR /&gt;
33   put fld_name;&lt;BR /&gt;
34   msg_txt =tranwrd(msg_txt,trim(fld_name),trim(fld_txt));&lt;BR /&gt;
35   msg_txt = compress(msg_txt,'()');&lt;BR /&gt;
36   drop fld_txt fld_name i;&lt;BR /&gt;
37   PUT '****';&lt;BR /&gt;
38   end;&lt;BR /&gt;
39   run;&lt;BR /&gt;
&lt;BR /&gt;
678954&lt;BR /&gt;
Account#&lt;BR /&gt;
****&lt;BR /&gt;
$51,209&lt;BR /&gt;
AggValue&lt;BR /&gt;
****&lt;BR /&gt;
4/2/09&lt;BR /&gt;
EndDt&lt;BR /&gt;
****&lt;BR /&gt;
8&lt;BR /&gt;
NumberOfTrans&lt;BR /&gt;
****&lt;BR /&gt;
Gary Johnson&lt;BR /&gt;
PARTY NAME&lt;BR /&gt;
****&lt;BR /&gt;
4/2/09&lt;BR /&gt;
StartDt&lt;BR /&gt;
***&lt;BR /&gt;
And this is my text message where the filed names (eg. startDt) have to be replaced with teh field txt (eg. 4/2/09).&lt;BR /&gt;
"The activity is in the name of &lt;PARTY name=""&gt;&lt;/PARTY&gt;. There were &lt;NUMBEROFTRANS&gt;&lt;/NUMBEROFTRANS&gt; cash transactions on account &lt;ACCOUNT&gt;&lt;/ACCOUNT&gt; between &lt;STARTDT&gt;&lt;/STARTDT&gt; and &lt;ENDDT&gt;&lt;/ENDDT&gt; that aggregated to &lt;AGGVALUE&gt;&lt;/AGGVALUE&gt;.&lt;BR /&gt;
&lt;BR /&gt;
So though the StartDt has a value of 4/2/09 , when it actually gets replaced in the Message it becomes 4209. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Tue, 20 Jul 2010 19:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53450#M11282</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-20T19:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53451#M11283</link>
      <description>Honestly, you need to get a handle to understand the data in your input file, mydata.e_join, particularly using PROC CONTENTS to interrogate the variable types, where a FORMAT is being used, and also add PUTLOG _ALL_; commands to your DATA step along each path and with/outside DO/END loops.  Also, use PROC FREQ to see unique value conditions so that you have confidence that your DATA step logic can handle the various data conditions.&lt;BR /&gt;
&lt;BR /&gt;
Again, a SAS numeric type DATE variable internally has a value of "days since 1/1/1960" and if you are attempting to convert a character string and substitute with a date, you must use a PUT(&lt;VARNAME&gt;,&lt;FORMATNAME&gt;.) to translate to the desired "output format".&lt;BR /&gt;
&lt;BR /&gt;
My recommendation (maybe even not for the first time) is that you should use a small data sample with various conditions to test all code-path processes -- use PUTLOG _ALL_;  and get a clear understanding about every SAS log diagnostic message generated (and react to each with confidence, or come back here for guidance) -- but also do so with a SAS log pasted in your reply and not just your code.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/FORMATNAME&gt;&lt;/VARNAME&gt;</description>
      <pubDate>Tue, 20 Jul 2010 19:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53451#M11283</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-20T19:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53452#M11284</link>
      <description>HEre is teh output of the PUTLOG which I used befor and after the TRANWRD function.  I did not paste earlier because its too huge. What i can see is that the date gets inserted correctly in the msg txt but in the iteration after that, it becomes 4209. This date is also just a character variable in the Field_txt. Can you help please?&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of &lt;PARTY name=""&gt;&lt;/PARTY&gt; which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
 There were &lt;NUMBEROFTRANS&gt;&lt;/NUMBEROFTRANS&gt; cash transactions on account &lt;ACCOUNT&gt;&lt;/ACCOUNT&gt; between &lt;STARTDT&gt;&lt;/STARTDT&gt; and &lt;ENDDT&gt;&lt;/ENDDT&gt; that aggregated to &lt;AGGV&gt;&lt;BR /&gt;
alue/&amp;gt;. fld1=678954 fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue&lt;BR /&gt;
attr3=EndDt attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=1 fld_txt=678954 fld_name=Account# _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of &lt;PARTY name=""&gt;&lt;/PARTY&gt; which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
 There were &lt;NUMBEROFTRANS&gt;&lt;/NUMBEROFTRANS&gt; cash transactions on account &amp;lt;678954/&amp;gt; between &lt;STARTDT&gt;&lt;/STARTDT&gt; and &lt;ENDDT&gt;&lt;/ENDDT&gt; that aggregated to &lt;AGGVAL&gt;&lt;BR /&gt;
ue/&amp;gt;. fld1=678954 fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue&lt;BR /&gt;
attr3=EndDt attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=1 fld_txt=678954 fld_name=Account# _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were NumberOfTrans cash transactions on account 678954 between StartDt and EndDt that aggregated to AggValue. fld1=678954&lt;BR /&gt;
fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt&lt;BR /&gt;
attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=2 fld_txt=$51,209 fld_name=AggValue _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were NumberOfTrans cash transactions on account 678954 between StartDt and EndDt that aggregated to $51,209. fld1=678954&lt;BR /&gt;
fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt&lt;BR /&gt;
attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=2 fld_txt=$51,209 fld_name=AggValue _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were NumberOfTrans cash transactions on account 678954 between StartDt and EndDt that aggregated to $51,209. fld1=678954&lt;BR /&gt;
fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt&lt;BR /&gt;
attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=3 fld_txt=4/2/09 fld_name=EndDt _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were NumberOfTrans cash transactions on account 678954 between StartDt and 4/2/09 that aggregated to $51,209. fld1=678954&lt;BR /&gt;
fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt&lt;BR /&gt;
attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=3 fld_txt=4/2/09 fld_name=EndDt _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were NumberOfTrans cash transactions on account 678954 between StartDt and 4209 that aggregated to $51,209. fld1=678954&lt;BR /&gt;
fld2=$51,209 fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt&lt;BR /&gt;
attr4=NumberOfTrans attr5=PARTY NAME attr6=StartDt attr7=  i=4 fld_txt=8 fld_name=NumberOfTrans _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were 8 cash transactions on account 678954 between StartDt and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=4 fld_txt=8 fld_name=NumberOfTrans _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of PARTY NAME which indicates possible structuring of transactions to avoid currency transaction reporting limits. Th&lt;BR /&gt;
ere were 8 cash transactions on account 678954 between StartDt and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=5 fld_txt=Gary Johnson fld_name=PARTY NAME _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of Gary Johnson which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
There were 8 cash transactions on account 678954 between StartDt and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=5 fld_txt=Gary Johnson fld_name=PARTY NAME _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of Gary Johnson which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
There were 8 cash transactions on account 678954 between StartDt and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=6 fld_txt=4/2/09 fld_name=StartDt _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of Gary Johnson which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
There were 8 cash transactions on account 678954 between 4/2/09 and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=6 fld_txt=4/2/09 fld_name=StartDt _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of Gary Johnson which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
There were 8 cash transactions on account 678954 between 4209 and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=7 fld_txt=  fld_name=  _ERROR_=0 _N_=4&lt;BR /&gt;
Cust_no=123 Cust_typ=EVENT Cust_id=1 MSG_ID=23456 MSG_SEQ_NO=1&lt;BR /&gt;
MSG_TXT=The event is an activity in &lt;BR /&gt;
the name of Gary Johnson which indicates possible structuring of transactions to avoid currency transaction reporting limits.&lt;BR /&gt;
There were 8 cash transactions on account 678954 between 4209 and 4209 that aggregated to $51,209. fld1=678954 fld2=$51,209&lt;BR /&gt;
fld3=4/2/09 fld4=8 fld5=Gary Johnson fld6=4/2/09 fld7=  attr1=Account# attr2=AggValue attr3=EndDt attr4=NumberOfTrans&lt;BR /&gt;
attr5=PARTY NAME attr6=StartDt attr7=  i=7 fld_txt=  fld_name=  _ERROR_=0 _N_=4&lt;BR /&gt;
**************************************************************************************************************&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you!&lt;/AGGVAL&gt;&lt;/AGGV&gt;</description>
      <pubDate>Tue, 20 Jul 2010 20:12:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53452#M11284</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-20T20:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53453#M11285</link>
      <description>Something is inconsistent, along with the observation that the logic process is inefficient because you are re-loading the array with every DATA step pass -- not using the MERGE / BY process as previously recommended.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Also, consider that you are using TRANWRD with values like "StartDt" and "4/2/09" yet I see in MSG_TXT there are strings with "&amp;lt;", "&amp;gt;", "/" and so I expect some assignment logic has to be in your code (maybe we're not seeing it all?)  to remove the slash-character, which just happens to be part of the "character string date-value" you have that is also being manipulated.&lt;BR /&gt;
&lt;BR /&gt;
You're going to need to dissect your program, by comment out logic, stopping/starting  or doing a more useful PUTLOG 'Diag-nn' / _ALL_;  command(s) peppered throughout your program's DATA step -- inside DO/END loops.&lt;BR /&gt;
&lt;BR /&gt;
Mostly it's going to be up to you to diagnose what's going on.  Your MSG_TXT variable is being manipulated somehow to strip-out the terminating-characters, as I mentioned, and we're not seeing all of that process.&lt;BR /&gt;
&lt;BR /&gt;
Again, I encourage you to simplify the processing and work with a subset of fields to get the logic-flow working as you would expect, then expand the program slowly checking each next-larger set of data-values along the way.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 20 Jul 2010 21:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53453#M11285</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-20T21:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53454#M11286</link>
      <description>You are right. Not sure but I have this in my code:&lt;BR /&gt;
msg_txt = compress(msg_txt,'()'); &lt;BR /&gt;
&lt;BR /&gt;
And this was causing the / to be removed from the dates too. &lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot!!!</description>
      <pubDate>Wed, 21 Jul 2010 16:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53454#M11286</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-21T16:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53455#M11287</link>
      <description>Hi:&lt;BR /&gt;
  I do NOT observe your same behavior of the COMPRESS function. If I run a test, as shown below, then I get ONLY the () being removed from my text string. (results at the end of this post)  I would suggest that you report this odd behavior to Tech Support. Test Program:&lt;BR /&gt;
 [pre]&lt;BR /&gt;
data testit;&lt;BR /&gt;
  length msg_txt msg_txt2 $100 datestr datestr2 $10;&lt;BR /&gt;
  msg_txt='07/21/2010 Twas (brillig and the )slithy /toves did gyre and \ gimble, in the wabe.';&lt;BR /&gt;
  msg_txt2 = compress(msg_txt,'()');&lt;BR /&gt;
  put '******************************';&lt;BR /&gt;
  put 'Original String --- ' msg_txt=;&lt;BR /&gt;
  put 'After Compress --- ' msg_txt2=;&lt;BR /&gt;
                    &lt;BR /&gt;
  datestr = '07/21/2010';&lt;BR /&gt;
  datestr2 = compress(datestr,'()');&lt;BR /&gt;
  put '******************************';&lt;BR /&gt;
  put 'Original String --- ' datestr=;&lt;BR /&gt;
  put 'After Compress --- ' datestr2=;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
1568  data testit;&lt;BR /&gt;
1569    length msg_txt msg_txt2 $100 datestr datestr2 $10;&lt;BR /&gt;
1570    msg_txt='07/21/2010 Twas (brillig and the )slithy /toves did gyre and \ gimble, in the wabe.';&lt;BR /&gt;
1571    msg_txt2 = compress(msg_txt,'()');&lt;BR /&gt;
1572    put '******************************';&lt;BR /&gt;
1573    put 'Original String --- ' msg_txt=;&lt;BR /&gt;
1574    put 'After Compress --- ' msg_txt2=;&lt;BR /&gt;
1575&lt;BR /&gt;
1576    datestr = '07/21/2010';&lt;BR /&gt;
1577    datestr2 = compress(datestr,'()');&lt;BR /&gt;
1578    put '******************************';&lt;BR /&gt;
1579    put 'Original String --- ' datestr=;&lt;BR /&gt;
1580    put 'After Compress --- ' datestr2=;&lt;BR /&gt;
1581  run;&lt;BR /&gt;
                          &lt;BR /&gt;
******************************&lt;BR /&gt;
Original String --- msg_txt=07/21/2010 Twas (brillig and the )slithy /toves did gyre and \ gimble, in the wabe.&lt;BR /&gt;
After Compress --- msg_txt2=07/21/2010 Twas brillig and the slithy /toves did gyre and \ gimble, in the wabe.&lt;BR /&gt;
******************************&lt;BR /&gt;
Original String --- datestr=07/21/2010&lt;BR /&gt;
After Compress --- datestr2=07/21/2010&lt;BR /&gt;
                              &lt;BR /&gt;
NOTE: The data set WORK.TESTIT has 1 observations and 4 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 21 Jul 2010 16:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53455#M11287</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-21T16:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53456#M11288</link>
      <description>yes you are right too. Because I am missing a slash in the code that I have pasted here. But I do have it. &lt;BR /&gt;
&lt;BR /&gt;
Now here is my issue. If I remove these slashes using Compress it also removes the slashes in the dates, since thsi processing happens in a loop. &lt;BR /&gt;
IS there a way to apeend  ''  to PARTY NAME , so that it now looks like &lt;BR /&gt;
&lt;PARTY name=""&gt;&lt;/PARTY&gt;?  Once I achieve this I can replace the entire word' &lt;PARTY name=""&gt;&lt;/PARTY&gt; instead of using a  compress.</description>
      <pubDate>Wed, 21 Jul 2010 17:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53456#M11288</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-21T17:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53457#M11289</link>
      <description>Honestly....it would have taken you less time to test out the question yourself with a simple DATA step then it takes to ask and then get a reply.&lt;BR /&gt;
&lt;BR /&gt;
Also, we've been down this path already with your SAS program, suggesting that your "template/variable data" MERGE use the TRANWRD, which appears to work fine, days ago.&lt;BR /&gt;
&lt;BR /&gt;
As the DOC intends and as you've seen, COMPRESS is going to remove any specified character from the argument-1 variable.  Your template MSG_TEXT variable and your ATTR variable need to contain the "target string" that you want to translate as a WORD using TRANWRD.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 21 Jul 2010 18:43:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53457#M11289</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-21T18:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: TRANWRD funtion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53458#M11290</link>
      <description>I dont intend to use up your time but only get your opinions as you might be able to give me a better way of coding. &lt;BR /&gt;
I am really not understanding the MERGE part that you mentioned, but what I did was use :&lt;BR /&gt;
tfld_name = "&amp;lt;" || TRIM(LEFT(fld_name)) || "/&amp;gt;" ;&lt;BR /&gt;
and then use TRANWRD.&lt;BR /&gt;
&lt;BR /&gt;
Sorry if my posts caused you trouble.</description>
      <pubDate>Wed, 21 Jul 2010 18:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TRANWRD-funtion/m-p/53458#M11290</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-21T18:57:17Z</dc:date>
    </item>
  </channel>
</rss>

