<?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: Edit Using SAS Code Seems to Not Work in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197849#M2592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zach, you might be able to use the Recode Variables feature in the EG Query Builder to accomplish what you want.&amp;nbsp; In the Query Builder, go to Computed Columns, New, then select Recoded Column.&amp;nbsp; You'll have a few choices for how you express the recoding rules.&amp;nbsp; There's an article that &lt;A href="http://support.sas.com/kb/38/261.html"&gt;covers a simple example here in this SAS note.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Dr. AnnMaria shares this experience for &lt;A href="http://www.thejuliagroup.com/blog/?p=230"&gt;how to fix character data without the beatings&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 16:46:10 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2015-08-13T16:46:10Z</dc:date>
    <item>
      <title>Edit Using SAS Code Seems to Not Work</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197848#M2591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I pepare my data in Enterprise Guide then save it out into a directory to be later read into Enterprise Miner. There are a lot of variables where I would like to set varying parameters. Below are a few examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;* if Role = "TIMEID" then Level = "INTERVAL";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Role = "INPUT";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if Name = "TRENDED_INCURRED" then Role = "TARGET";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;* Making all of the Text Flag fields Nominal;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;TEXT_ID = index(Name, "Flag");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if TEXT_ID = 1 then Level = "Nominal";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;* Dropping all of the Date variables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if Role = "TIMEID" then Drop = "Y";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;* Changing the following vars to Nominal - some ORDINAL sprinkled in as well for HAZARDC0DE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if Name = MAXTOTALCODE then Level = Nominal;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if Name = DOCTORS then Level = Nominal;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see that I commented out some of my statements as well - do not know if Edit Using SAS Code likes this. If I recall correctly Enterprise Miner can be a little quirky where sometimes it does not like blank lines, or stuff like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am in the window of editing the SAS code everything looks fine. But when I say OK and re-open my SAS data file in Miner it shows a lot of weird changes or many changes that are just left blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is anything wrong with my version of Miner? But, my big question is if I can set the variable Levels, Roles, and Drop statuses in Enterprise Guide before it is read into Enterprise Miner?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 21:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197848#M2591</guid>
      <dc:creator>Zachary</dc:creator>
      <dc:date>2015-08-12T21:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Using SAS Code Seems to Not Work</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197849#M2592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zach, you might be able to use the Recode Variables feature in the EG Query Builder to accomplish what you want.&amp;nbsp; In the Query Builder, go to Computed Columns, New, then select Recoded Column.&amp;nbsp; You'll have a few choices for how you express the recoding rules.&amp;nbsp; There's an article that &lt;A href="http://support.sas.com/kb/38/261.html"&gt;covers a simple example here in this SAS note.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, Dr. AnnMaria shares this experience for &lt;A href="http://www.thejuliagroup.com/blog/?p=230"&gt;how to fix character data without the beatings&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 16:46:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197849#M2592</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-08-13T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Using SAS Code Seems to Not Work</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197850#M2593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Chris. I love the Dr. AnnMaria blog as well - will be visiting that occasionally - she is very funny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I THINK I have figured out how to effectively use Edit Using SAS Code for the Edit Variables window. Below are some suggestions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not think the system likes comments - either via *; or /* */.&lt;/P&gt;&lt;P&gt;Nor do I think it wants blank lines in there.&lt;/P&gt;&lt;P&gt;This might be a place in SAS where it is important to capitalize key words. So if I set my Level to Nominal, it actually needs to be NOMINAL even though it does not show as all Caps in the window.&lt;/P&gt;&lt;P&gt;I need to experiment more with this one, but I once thought it was important to have a run; after a set of code. But I am not so sure anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are not much - but following those steps seems to help the process move along in an automated way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anything else I might have missed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 13:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197850#M2593</guid>
      <dc:creator>Zachary</dc:creator>
      <dc:date>2015-08-14T13:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Using SAS Code Seems to Not Work</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197851#M2594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's correct about upper-casing the values for the variable measurement levels and roles.&amp;nbsp; But comments and blank lines should be allowed, so not sure why that is causing problems for you.&amp;nbsp; There are some other ways you can define metadata described in this Tip on &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;Defining Global Metadata for SAS® Enterprise Miner™ Projects&lt;/STRONG&gt; that might be of interest:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/docs/DOC-11122"&gt;https://communities.sas.com/docs/DOC-11122&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 13:37:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197851#M2594</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2015-08-14T13:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Using SAS Code Seems to Not Work</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197852#M2595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch. Will look into if my comments were more a result of a panic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually - thank you for the link. I now have numerous options in how I can make my data meaningful! Thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 14:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Edit-Using-SAS-Code-Seems-to-Not-Work/m-p/197852#M2595</guid>
      <dc:creator>Zachary</dc:creator>
      <dc:date>2015-08-14T14:26:45Z</dc:date>
    </item>
  </channel>
</rss>

