<?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: DI-studio : SCD Type 2 - close out records in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150166#M2546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, SAS Support, was able to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"if you want only key values close out the first time encountered when using the option "Close out records not in source table", you would need to add the "User current indicator" under Change Tracking in addition to "User beginning and end dates". Adding the current indicator method will prevent closed keys from being retrieved during the subsequent executions of the SCD Type 2 process."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Oct 2014 17:48:21 GMT</pubDate>
    <dc:creator>Allan_dk</dc:creator>
    <dc:date>2014-10-08T17:48:21Z</dc:date>
    <item>
      <title>DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150155#M2535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the transformations propeties/options it is possible to activate&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Close out records not in source table: For records not in source table, assume they are to be closed out in target table.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a record is missing in the source data the transformation set the validtime_end til %SYSFUNC(DATETIME())&amp;nbsp; and that is what I expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="49" style="border: 1px solid #000000; width: 417px; height: 0px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;vt_start&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;vt_end&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01jan2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;31dec9999:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the record is found missing&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="49" style="border: 1px solid #000000; width: 417px; height: 0px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;vt_start&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;vt_end&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01jan2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;17sep2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the next day the transformation runs it apparently updates the record in the target table.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="49" style="border: 1px solid #000000; width: 417px; height: 0px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;vt_start&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;vt_end&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01jan2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15mar2014:0:0:0&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;18sep2014:0:0:0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I lose track of when the record was detected missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DI-studio v4.6&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 09:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150155#M2535</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-09-18T09:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150156#M2536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not only the date of your missing has changed but also the vt_end date of that other record. With SCD-type historical records are expected to be archived not changed.&lt;/P&gt;&lt;P&gt;The problem of that missing date should be reviewed. Either it is some data quality is that needs to be corrected or it is a not closed record that gets updated.&lt;/P&gt;&lt;P&gt;In both cases imputation by the execution moment is not the best option. In the first case there will be a more logical end-date as period end in the latter case it must be recognized as getting to be updated.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 10:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150156#M2536</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-18T10:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150157#M2537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried with DIS 4.9 to replicate what you describe but didn't have this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What kind of surprises me is that your end dates "vt_end" has "00:00:00" and not some real times in it given that the formula is: &lt;SPAN style="font-family: 'courier new', courier;"&gt;ETLS_CLSDATE = DATETIME();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an explanation for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please post a screen shot of "SCD Type 2 Properties/Options/SCD *".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any columns under SCD1? - I've tried this one but still couldn't replicate what you describe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The relevant loader generated code I get is as below. Does this look the same in your version of DIS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Close out any records that are in the xref table but not in the source.&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if inXref and not inSort then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETLS_CLSDATE = DATETIME();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load_Dttm = input("&amp;amp;etls_loadtime", datetime20.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETLS_LOADTIME = input("&amp;amp;etls_loadtime", datetime20.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output work.etls_close;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh, I just realized you're writing "..validtime_end til %SYSFUNC(DATETIME())". That should be the expression for the start datetime not the end datetime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to make sure:&lt;/P&gt;&lt;P&gt;You're using columns vt_start and vt_end under tab "Change Tracking" and it looks as below?&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Date&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Column Name&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Expression&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Beginning Date&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;vt_start&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;%sysfunc(datetime())&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;End Date&lt;/TD&gt;&lt;TD&gt;vt_end&lt;/TD&gt;&lt;TD&gt;'01Jan5999:00:00:00'DT&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not: Could you please post a screenshot how things actually look under this tab?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150157#M2537</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-18T11:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150158#M2538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="8872" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is about the DIS SCD2 standard loader so the question is "why" is the loader behaving this way. Is it a bug or something which could be controlled by setting some of the options differently?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150158#M2538</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-18T11:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150159#M2539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you know what should be done and what is wanted, you can give those answers yourself. The question left would be:&lt;/P&gt;&lt;P&gt;- I am missing an option somebody an alternative?&lt;BR /&gt;- I am seeing this is behaving this way, In my opinion that is not correct am I missing something?&lt;BR /&gt;That is more thinking in conceptual lines than just doing some mouse clicks and something seeing unexpected.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150159#M2539</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-18T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150160#M2540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vt_end has 0:0:0 because it is just testdata.&lt;/P&gt;&lt;P&gt;There are no columns under SCD1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="scd2.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/7440_scd2.PNG" width="450" /&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;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Close out any records that are in the xref table but not in the source.&amp;nbsp; */ &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if inXref and not inSort then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ETLS_CLSDATE = DATETIME();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output work.etls_close;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150160#M2540</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-09-18T11:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150161#M2541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="1" class="jiveBorder" style="border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid; padding: 2px;"&gt;Beginning Date&lt;/TD&gt;&lt;TD style="border: #000000 1px solid; padding: 2px;"&gt;vt_start&lt;/TD&gt;&lt;TD style="border: #000000 1px solid; padding: 2px;"&gt;%sysfunc(datetime())&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: #000000 1px solid;"&gt;End Date&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;vt_end&lt;/TD&gt;&lt;TD style="border: #000000 1px solid;"&gt;'01Jan9999:00:00:00'DT&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Except from that we use 9999 instead of 5999 you are correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150161#M2541</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-09-18T11:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150162#M2542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;vt_end has 0:0:0 because it is just testdata.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by that? It's data you've made up when posting your question or it's test data in your source?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you're having an issue with the date alignment please post an example with real datetime values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you - by any chance - mapping vt_start and vt_end from source?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It needs to look like this (valid_from_dttm and valid_to_dttm are your vt_ variables).&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="7444" alt="Capture.PNG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/7444_Capture.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 22:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150162#M2542</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-18T22:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150163#M2543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the real data and some more dokumentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.google.com/document/d/1nuuzTusBcz1QgmVn_J_6A8Gc1vkeU8gdkj-lL9NqasI/edit?usp=sharing"&gt;https://docs.google.com/document/d/1nuuzTusBcz1QgmVn_J_6A8Gc1vkeU8gdkj-lL9NqasI/edit?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 10:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150163#M2543</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-09-22T10:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150164#M2544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you see you have put all colums as being subject to "detect changes" including beging and end dates?&lt;/P&gt;&lt;P&gt;It is not logical to put all columns there, only those that should be checked on that content must be there.&lt;/P&gt;&lt;P&gt;See figure 4 in &lt;A href="http://www2.sas.com/proceedings/forum2007/100-2007.pdf" title="http://www2.sas.com/proceedings/forum2007/100-2007.pdf"&gt;http://www2.sas.com/proceedings/forum2007/100-2007.pdf&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://www2.sas.com/proceedings/sugi31/096-31.pdf" title="http://www2.sas.com/proceedings/sugi31/096-31.pdf"&gt;http://www2.sas.com/proceedings/sugi31/096-31.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 06:24:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150164#M2544</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-25T06:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150165#M2545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I know that i have all columns marked for detect changes. Including vtend and vtbegin.&lt;/P&gt;&lt;P&gt;In this case it makes sense - including vtbegin and vtend. These are just ordinary variables that I would like to keep track on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 06:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150165#M2545</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-09-25T06:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150166#M2546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, SAS Support, was able to help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"if you want only key values close out the first time encountered when using the option "Close out records not in source table", you would need to add the "User current indicator" under Change Tracking in addition to "User beginning and end dates". Adding the current indicator method will prevent closed keys from being retrieved during the subsequent executions of the SCD Type 2 process."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 17:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150166#M2546</guid>
      <dc:creator>Allan_dk</dc:creator>
      <dc:date>2014-10-08T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150167#M2547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent, &lt;A _jive_internal="true" href="https://communities.sas.com/people/Allan_dk"&gt;Allan_dk&lt;/A&gt;! Thanks for coming back to this thread with the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 19:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150167#M2547</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2014-10-08T19:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: DI-studio : SCD Type 2 - close out records</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150168#M2548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with Anna.&lt;/P&gt;&lt;P&gt;But crazy solution. Does anybody want they closed out records being closed out all the time? You shouldn't need the current indicator...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that we are on the subject (sorry for hi-jacking the thread - should never happen again:smileyblush:): shouldn't the close date reflect the expression of the "Beginning Date" on the Change Tracking tab?&lt;/P&gt;&lt;P&gt;Like it is now, if we use a centralized date (like a batch reference date) we could have mixed types of close dates (valid to dt), one using supplied batch date, and others using the computer clock. The current work-around is to pre-join the transactions with the target table and close out the record "manually".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 20:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-SCD-Type-2-close-out-records/m-p/150168#M2548</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-10-08T20:16:44Z</dc:date>
    </item>
  </channel>
</rss>

