<?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: how to reverse a string with out using reverse function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170404#M32730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is not working in log window it mesge that numeric varibles are converted in to char and char to numeric....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 05:55:26 GMT</pubDate>
    <dc:creator>rohithrao</dc:creator>
    <dc:date>2015-01-07T05:55:26Z</dc:date>
    <item>
      <title>how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170401#M32727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to reverse a string with out using reverse function , by using do loop?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 13:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170401#M32727</guid>
      <dc:creator>rohithrao</dc:creator>
      <dc:date>2015-01-06T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170402#M32728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you could do:&lt;/P&gt;&lt;P&gt;do I=length(variable) to 1 by -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_var=strip(new_var)||substr(variable,i,1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question would be why when there is a perfectly good function for it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 13:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170402#M32728</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-06T13:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170403#M32729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Homework&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 14:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170403#M32729</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-06T14:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170404#M32730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is not working in log window it mesge that numeric varibles are converted in to char and char to numeric....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 05:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170404#M32730</guid>
      <dc:creator>rohithrao</dc:creator>
      <dc:date>2015-01-07T05:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170405#M32731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;my_name = 'Tarun Kumar';&lt;/P&gt;&lt;P&gt;length my_name_new$20.;&lt;/P&gt;&lt;P&gt;do i = 1 to length(my_name);&lt;/P&gt;&lt;P&gt;substr(my_name_new,i,1) = substr(my_name,length(my_name)+1-i,1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;put (my_name my_name_new) (=);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 08:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170405#M32731</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2015-01-07T08:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170406#M32732</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;Not sure why that is, this works:&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; test="Hello World";&lt;/P&gt;&lt;P&gt;&amp;nbsp; length new_var $200;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=length(test) to 1 by -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_var=strip(new_var)||substr(test,i,1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I note that after looking at the output, spaces between words are removed.&amp;nbsp; Hadn't thought about that as just typed the code in as an example.&amp;nbsp; Use the function! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 09:15:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170406#M32732</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-07T09:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170407#M32733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reversing the String IN PLACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; t = 'Hello World SAS Communities';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length C $1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; len = length(t);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; j = len;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do i = 1 to len while(i &amp;lt; j);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C = substr(t, i, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(t, i, 1) = substr(t, j, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; substr(t, j, 1) = C;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j +- 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; put t = ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 09:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170407#M32733</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2015-01-07T09:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170408#M32734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still spaces are removed...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 10:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170408#M32734</guid>
      <dc:creator>rohithrao</dc:creator>
      <dc:date>2015-01-07T10:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170409#M32735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do&amp;nbsp; you want keep these trailing blanks ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data temp;
&amp;nbsp; test="Hello World&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ";
&amp;nbsp; length new_var $200;
&amp;nbsp; array x{200} $ 1 _temporary_;
&amp;nbsp; n=length(test);
&amp;nbsp; do i=n to 1 by -1 ;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x{n-i+1}=char(test,i);
&amp;nbsp; end;
&amp;nbsp; new_var=cat(of x{*});
&amp;nbsp; call missing(of x{*});
&amp;nbsp; drop&amp;nbsp; i n ;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 11:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170409#M32735</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-01-07T11:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170410#M32736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;rohithrao wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;how to reverse a string with out using reverse function , by using do loop?&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You read it using the $REVERJ INFORMAT of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1-7-2015 7-35-32 AM.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/8609_1-7-2015 7-35-32 AM.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170410#M32736</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-01-07T13:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170411#M32737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text='Hello World';&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array r[11] $ 1 c11-c1;&lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call pokelong(text, addrlong(r[1]));&lt;/P&gt;&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reverse=cat(of c1-c11);&lt;/P&gt;&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put reverse;&lt;/P&gt;&lt;P&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dlroW olleH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: FriedEgg, well noted @DN, I updated to reflect your comment, forgot that little tidbit!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170411#M32737</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2015-01-07T13:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to reverse a string with out using reverse function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170412#M32738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;FriedEgg wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;/P&gt;
&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text='Hello World';&lt;/P&gt;
&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; array r[11] $ 1 c11 c10 c9 c8 c7 c6 c5 c4 c3 c2 c1;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call pokelong(text, addrlong(r[1]));&lt;/P&gt;
&lt;P&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reverse=cat(of c1-c11);&lt;/P&gt;
&lt;P&gt;18&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put reverse;&lt;/P&gt;
&lt;P&gt;19&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;dlroW olleH&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you know that an enumerated variable list can be written ascending or descending, as in&lt;STRONG&gt; C11-C1&lt;/STRONG&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:24:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-reverse-a-string-with-out-using-reverse-function/m-p/170412#M32738</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-01-07T14:24:35Z</dc:date>
    </item>
  </channel>
</rss>

