<?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: SAS DIS - Data steps in user written code in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/428177#M13199</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it is a redundant question but it has come up: Even if we create a data set with a different name from the one that is in the "set" instruction, we also lose the indexes and constraints information from A, right? I mean:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data B;
set A;
if &amp;lt;condition&amp;gt;;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May15&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2018 21:27:40 GMT</pubDate>
    <dc:creator>May15</dc:creator>
    <dc:date>2018-01-16T21:27:40Z</dc:date>
    <item>
      <title>SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/399906#M12151</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a doubt regarding the properties of a table after running a particular data step in the user written code trasnformation of SAS Data Integration Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supposing that table A is a table created in SAS Data Integration Studio with primary key, indexes, constraints, columns with specific formats and informats,... Does anyone know if we lose these properties after running a step like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
set A;
if &amp;lt;condition&amp;gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LF&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 19:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/399906#M12151</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2017-09-29T19:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/399933#M12152</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152882"&gt;@May15&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The code you've posted will create a new table with a name as defined via "DATA A;".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The table in the SET statement will get used for defining the variables for this new table. Indices, constraints and other table attributes won't get replicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;During data step execution output records will get written to a table with a temporary name (automatically created by SAS).&lt;/P&gt;
&lt;P&gt;After successful completion of all data step iterations the table will get renamed to the name as defined in the DATA statement &amp;nbsp;- "A" in your case. This renaming process will replace any already pre-existing same named table with the newly created table (different physical object).&lt;/P&gt;
&lt;P&gt;Because any indices and constraints belong to the old same named table, these indices and constraints will get dropped as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using DIS:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best practice is to use the available transformations as far as possible and to avoid User Written Code. To subset data use the SQL Extract or SQL Delete transformation.&lt;/P&gt;
&lt;P&gt;If you really must use User Written Coden then try to incorporate the available macro variables created by the transformation so your code remains at least to a certain degree metadata driven.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 22:04:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/399933#M12152</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-09-29T22:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/400009#M12153</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your answer. It was really helpful.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 17:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/400009#M12153</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2017-09-30T17:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421627#M12942</link>
      <description>&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding your answer, a question have came up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to use the Delete transformation. However, we don't save space using it. Am I right? It is an issue to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LF15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 16:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421627#M12942</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2017-12-15T16:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421673#M12943</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152882"&gt;@May15&lt;/a&gt;, since this is a new question please create a new thread in the future.&lt;BR /&gt;&lt;BR /&gt;Regarding delete you might be right, given that your target table is a SAS data set. When you delete rows "in place" the space is not physically freed. What you can do is definte the tbke with the REUSE dat set option. Another option is to recreate the table with some frequency.</description>
      <pubDate>Fri, 15 Dec 2017 18:46:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421673#M12943</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-12-15T18:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421720#M12944</link>
      <description>&lt;P&gt;Hi LinusH,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. Just one doubt: What does tbke stand for?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 22:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421720#M12944</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2017-12-15T22:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421794#M12950</link>
      <description>Oh darn auto correct...&lt;span class="lia-unicode-emoji" title=":squinting_face_with_tongue:"&gt;😝&lt;/span&gt;&lt;BR /&gt;It should read "...define the table with the REUSE data set option."</description>
      <pubDate>Sat, 16 Dec 2017 20:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/421794#M12950</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-12-16T20:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/422538#M12972</link>
      <description>&lt;P&gt;Hi LinusH,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh ok, now it makes sense &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 23:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/422538#M12972</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2017-12-19T23:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DIS - Data steps in user written code</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/428177#M13199</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it is a redundant question but it has come up: Even if we create a data set with a different name from the one that is in the "set" instruction, we also lose the indexes and constraints information from A, right? I mean:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data B;
set A;
if &amp;lt;condition&amp;gt;;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May15&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 21:27:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DIS-Data-steps-in-user-written-code/m-p/428177#M13199</guid>
      <dc:creator>May15</dc:creator>
      <dc:date>2018-01-16T21:27:40Z</dc:date>
    </item>
  </channel>
</rss>

