<?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: newbi - where should I start with this? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/910#M445</link>
    <description>You're right -- this is not appropriate for the ODS forum.  However, a quick demonstration of the colon (:) operator shows how to change things beginning with "twink" can be changed to "whatever."&lt;BR /&gt;
data twinkdata;&lt;BR /&gt;
   input drag1 $char20. ;&lt;BR /&gt;
cards;&lt;BR /&gt;
twinkle&lt;BR /&gt;
twinky&lt;BR /&gt;
twinkles&lt;BR /&gt;
twinc&lt;BR /&gt;
twinck&lt;BR /&gt;
twinch&lt;BR /&gt;
Twinkie&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data twinkdata2;&lt;BR /&gt;
   length drag2 $ 20 ;&lt;BR /&gt;
   set twinkdata;&lt;BR /&gt;
   if drag1 =: "twink" then&lt;BR /&gt;
      drag2 = 'whatever';&lt;BR /&gt;
   else drag2 = drag1;&lt;BR /&gt;
run;&lt;BR /&gt;
title "Case Counts";&lt;BR /&gt;
proc print data = twinkdata2; &lt;BR /&gt;
   var drag1 drag2;&lt;BR /&gt;
run;</description>
    <pubDate>Tue, 27 Jun 2006 13:42:05 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2006-06-27T13:42:05Z</dc:date>
    <item>
      <title>newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/905#M440</link>
      <description>Hi Folks,&lt;BR /&gt;
&lt;BR /&gt;
I have a bunch of csv files that I imported into SAS but now have edit the contents and wonder if it would be easier in SAS or prior to sas.&lt;BR /&gt;
&lt;BR /&gt;
Essentially, in one of my character/string fields (length=75), I need to find every instance of say xxxxx (the tricky part is it may be anywhere in the string)and replace the entire string with yyyy.&lt;BR /&gt;
Could I do something like this in SAS?  I think I could do it with a programming language like delphi or vb but can SAS do this?  I would save me a lot of backtracking!  Any help greatly appreciated!&lt;BR /&gt;
&lt;BR /&gt;
Serge</description>
      <pubDate>Mon, 26 Jun 2006 18:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/905#M440</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-26T18:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/906#M441</link>
      <description>This is not an ODS question, but is one for Tech Support (or some research in the SAS documentation). This is absolutely something you can do with the SAS programming language and a data step progam. To point you in the right direction, you would use different SAS functions to find the string (like INDEX or the PRX functions) and then also use SAS functions to replace the string...this would happen while the data was still in SAS and before you created your CSV files from the modified data.&lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 26 Jun 2006 20:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/906#M441</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2006-06-26T20:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/907#M442</link>
      <description>have a look at the tranwrd() function.&lt;BR /&gt;
&lt;BR /&gt;
Choosing the best solution probably needs more information, but in a simple way this might do:&lt;BR /&gt;
 &lt;BR /&gt;
data updated ;&lt;BR /&gt;
   set as_loaded ;&lt;BR /&gt;
   string = tranwrd( string, "aaaaa", "bbbbb" );&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
translates all occurrences of string aaaaa to bbbbb, in column string, in table {as_loaded}, writing the updated table to (updated).&lt;BR /&gt;
&lt;BR /&gt;
Was that the kind of code scenario needed ?&lt;BR /&gt;
&lt;BR /&gt;
Peter</description>
      <pubDate>Mon, 26 Jun 2006 20:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/907#M442</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-26T20:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/908#M443</link>
      <description>Sorry for posting to the wrong forum.  I expected that including the word 'Base' in the forum title included discussions on base sas.   I assumed incorrectly.  Which forum would be the correct one - the enterprise forum?</description>
      <pubDate>Tue, 27 Jun 2006 12:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/908#M443</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T12:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/909#M444</link>
      <description>I was thinking something more like this (since the data is currently in a sas table now, I could go back to the csv - but would rather fix it here, now that I have it in sas)...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if drag1 eq 'twinkle'&lt;BR /&gt;
   or drag1 eq 'twinky'&lt;BR /&gt;
   or drag1 eq 'twinkles'&lt;BR /&gt;
      then do drag1 = 'whatever';end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Essentially ... I want to find any occurance -like- &lt;BR /&gt;
?twink? and replace the entire string with 'whatever'. &lt;BR /&gt;
I have been reading about regular expressions, not sure if that will help.  Also read something on a command called 'proc sql ... like' '%twink%'.  This seems like it is close but am not sure how to imbed that into the above which I have tested and works but only on those exact values and I want to broaden the scope.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thankls in advance,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Serge</description>
      <pubDate>Tue, 27 Jun 2006 12:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/909#M444</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T12:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/910#M445</link>
      <description>You're right -- this is not appropriate for the ODS forum.  However, a quick demonstration of the colon (:) operator shows how to change things beginning with "twink" can be changed to "whatever."&lt;BR /&gt;
data twinkdata;&lt;BR /&gt;
   input drag1 $char20. ;&lt;BR /&gt;
cards;&lt;BR /&gt;
twinkle&lt;BR /&gt;
twinky&lt;BR /&gt;
twinkles&lt;BR /&gt;
twinc&lt;BR /&gt;
twinck&lt;BR /&gt;
twinch&lt;BR /&gt;
Twinkie&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data twinkdata2;&lt;BR /&gt;
   length drag2 $ 20 ;&lt;BR /&gt;
   set twinkdata;&lt;BR /&gt;
   if drag1 =: "twink" then&lt;BR /&gt;
      drag2 = 'whatever';&lt;BR /&gt;
   else drag2 = drag1;&lt;BR /&gt;
run;&lt;BR /&gt;
title "Case Counts";&lt;BR /&gt;
proc print data = twinkdata2; &lt;BR /&gt;
   var drag1 drag2;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 27 Jun 2006 13:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/910#M445</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T13:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/911#M446</link>
      <description>In my previous reply to Sergio, I tried to write the punctuation mark, : (colon), but since I had a parenthesis next to it, it was turned into a smiley face.  I like smiles as much as anyone, but I'm not sure it's a good idea for software to assume I mean a smiley face when I mean a colon.  While I am here, I just would like to share with Sergio that I think he needs to seek out some beginners' help, and keep an open mind to learning, and accept that he will have to do a lot of work to become comfortable with a huge system.  There are classes and on-line training.  Also SAS-L people are very nice about answering newbie questions.  He should the problem very clear, not change it, thinking it must be simplified.</description>
      <pubDate>Tue, 27 Jun 2006 13:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/911#M446</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/912#M447</link>
      <description>Thanks,&lt;BR /&gt;
&lt;BR /&gt;
You are right, SAS is huge - it is an enterprise system (and this is my first enterprise job) with so many different ways to do things things (embedded PHP or Proc SQl ...).  It's very confusing just finding out how to phrase the question or use the right verbage in the help file to find a starting place.  &lt;BR /&gt;
I understand that the vast majority of the power of sas is in the language and I am trying to learn the basics from on-hand examples, web sites and here.  I am willing to put in the work just expect a few scream of frustration now and then.&lt;BR /&gt;
&lt;BR /&gt;
I am attempting to decipher your last post ... I think I get what you are suggesting!&lt;BR /&gt;
&lt;BR /&gt;
Serge</description>
      <pubDate>Tue, 27 Jun 2006 14:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/912#M447</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T14:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: newbi - where should I start with this?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/913#M448</link>
      <description>Sergio had trouble deciphering my post, I think, because I left out "make the" in:&lt;BR /&gt;
"Also SAS-L people are very nice about answering newbie questions. He should the make the problem very clear, not change it, thinking it must be simplified."&lt;BR /&gt;
By "simplified" I meant changing a variable like Diagnosis, which has millions of values, to gender because gender has only two.  That simplification makes the person who would like to help get off on the wrong track.&lt;BR /&gt;
On SAS-L you can ask questions about any SAS-related topic, not just the topics of the forums on Support.SAS.com.  The address is:&lt;BR /&gt;
&lt;A href="http://www.listserv.uga.edu/archives/sas-l.html" target="_blank"&gt;http://www.listserv.uga.edu/archives/sas-l.html&lt;/A&gt;</description>
      <pubDate>Tue, 27 Jun 2006 15:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/newbi-where-should-I-start-with-this/m-p/913#M448</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-06-27T15:05:13Z</dc:date>
    </item>
  </channel>
</rss>

