<?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 add new variable to a spde dataset in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716350#M38061</link>
    <description>&lt;P&gt;There is no real difference between managing SPDE and Base SAS data sets.&lt;/P&gt;
&lt;P&gt;The sImple answer is no.&lt;/P&gt;
&lt;P&gt;What you can do is do the PROC COPY, and then SQL ALTER TABLE.&lt;/P&gt;
&lt;P&gt;The table will be recreated, but that's probbaly fine since it's just the structure, not a mssive amount of data.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 09:33:46 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2021-02-03T09:33:46Z</dc:date>
    <item>
      <title>how to add new variable to a spde dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716189#M38058</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using a proc copy to copy a spde dataset from staging to dev (just the data structure).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code:&lt;/P&gt;
&lt;P&gt;libname sauto spde 'path1';&lt;/P&gt;
&lt;P&gt;libname sprop spde 'path2';&lt;/P&gt;
&lt;P&gt;libname dauto spde 'path3';&lt;/P&gt;
&lt;P&gt;libname dprop spde 'path4';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options obs=0;&lt;BR /&gt;proc copy in=sauto out=dauto;&lt;BR /&gt;select wc_auto_inforcesep2020 ;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way&amp;nbsp; to add a new variable such as format newvar $2. to a spde dataset, maybe with proc copy????&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 19:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716189#M38058</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2021-02-02T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to add new variable to a spde dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716350#M38061</link>
      <description>&lt;P&gt;There is no real difference between managing SPDE and Base SAS data sets.&lt;/P&gt;
&lt;P&gt;The sImple answer is no.&lt;/P&gt;
&lt;P&gt;What you can do is do the PROC COPY, and then SQL ALTER TABLE.&lt;/P&gt;
&lt;P&gt;The table will be recreated, but that's probbaly fine since it's just the structure, not a mssive amount of data.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 09:33:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716350#M38061</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-02-03T09:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to add new variable to a spde dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716357#M38062</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table will be recreated, but that's probbaly fine since it's just the structure, not a mssive amount of data.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It will rewrite the whole table; with SAS, any structural change requires this.&lt;/P&gt;
&lt;P&gt;Given the relative performance of SPDE libraries (thanks to threading), this will be considerably faster than changing a V9 dataset.&lt;/P&gt;
&lt;P&gt;I just ran a test with a larger dataset here; creating the dataset by copying from the V9 engine took 43 seconds, adding the column 15 seconds.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 10:12:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716357#M38062</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-03T10:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to add new variable to a spde dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716823#M38065</link>
      <description>Hello Mr. Bremser,&lt;BR /&gt;I am sorry but it is not clear for me.  Did you find a way to add a new variable using proc copy or you have use a data datasetname1; set datasetname; format newvar $2.;run;  If there is a way to do it with the proc copy, could you please provide me an example.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Feb 2021 14:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716823#M38065</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2021-02-04T14:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to add new variable to a spde dataset</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716824#M38066</link>
      <description>&lt;P&gt;No, you can't make any structural changes with proc copy. For this, you need a data step, or COPY and then ALTER TABLE in SQL. My observation was that ALTER TABLE still needs to rewrite the whole dataset, so, performancewise, you will be better off by using a DATA step to copy a dataset to SPDE and add a variable on the way.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 14:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-add-new-variable-to-a-spde-dataset/m-p/716824#M38066</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-04T14:56:01Z</dc:date>
    </item>
  </channel>
</rss>

