<?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 get a number how many row was inserted ? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/811367#M20309</link>
    <description>I use this code in pre-code to get the no. of records before the loader and then calculate at the end no. of records inserted, it works.&lt;BR /&gt;&lt;BR /&gt;data _NULL_;&lt;BR /&gt;if 0 then set sashelp.class nobs=n;&lt;BR /&gt;call symputx('nrows',n);&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;BR /&gt;%put nobs=&amp;amp;nrows;</description>
    <pubDate>Wed, 04 May 2022 05:45:50 GMT</pubDate>
    <dc:creator>Dawid3</dc:creator>
    <dc:date>2022-05-04T05:45:50Z</dc:date>
    <item>
      <title>how to get a number of rows that were inserted ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809844#M20305</link>
      <description>&lt;P&gt;Hi everyone, I wrote some code for sas DI where I get the start and end time of the job.&lt;BR /&gt;Does anyone know how to get a number, how many row was inserted?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%global startTm endTm;&lt;/P&gt;&lt;P&gt;%macro startTiming();&lt;/P&gt;&lt;P&gt;%let startTm = %sysfunc(datetime());&lt;/P&gt;&lt;P&gt;%mend startTiming;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro endTiming(entry=);&lt;/P&gt;&lt;P&gt;%let endTm = %sysfunc(datetime());&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;insert into lib.Tab&lt;BR /&gt;values("&amp;amp;Entry", &amp;amp;startTm, &amp;amp;endTm );&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%startTiming();&lt;/P&gt;&lt;P&gt;CODE OF JOB&lt;/P&gt;&lt;P&gt;%endTiming(entry=Tab);&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 19:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809844#M20305</guid>
      <dc:creator>Dawid3</dc:creator>
      <dc:date>2022-04-26T19:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a number how many row was inserted ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809849#M20306</link>
      <description>&lt;P&gt;If you have access to SAS Environment Manager, I think this information would be available if you activate performance logging:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/etlug/4.903/p1xs37ux2hnk80n1h9bdj5gnswcn.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/etlug/4.903/p1xs37ux2hnk80n1h9bdj5gnswcn.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;DI Studio has the macto variable etls_recnt avaible, but that only shows the no of records in the target table after the update, not no of records added/updated. I guess that you could have a pre-code to get the no of records before the the loader, and then calculate at the end no of records inserted?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 12:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809849#M20306</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-04-26T12:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a number of rows that were inserted ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809853#M20307</link>
      <description>&lt;P&gt;Unfortunately I don"t have access to SAS Environment Manager.&lt;BR /&gt;I think I could get a pre-code to get the no. of records before the loader and then calculate at the end no. of records inserted - as you say&lt;BR /&gt;Can you tell me how to get it?&lt;BR /&gt;I would like to enter the data that I have into the table where I have the start and end time.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 19:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809853#M20307</guid>
      <dc:creator>Dawid3</dc:creator>
      <dc:date>2022-04-26T19:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a number how many row was inserted ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809860#M20308</link>
      <description>&lt;P&gt;I haven't tried this, but if you add&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;sqlobs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after your PROC SQL, it should display the number of observations (rows).&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 12:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/809860#M20308</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-26T12:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a number how many row was inserted ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/811367#M20309</link>
      <description>I use this code in pre-code to get the no. of records before the loader and then calculate at the end no. of records inserted, it works.&lt;BR /&gt;&lt;BR /&gt;data _NULL_;&lt;BR /&gt;if 0 then set sashelp.class nobs=n;&lt;BR /&gt;call symputx('nrows',n);&lt;BR /&gt;stop;&lt;BR /&gt;run;&lt;BR /&gt;%put nobs=&amp;amp;nrows;</description>
      <pubDate>Wed, 04 May 2022 05:45:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/how-to-get-a-number-of-rows-that-were-inserted/m-p/811367#M20309</guid>
      <dc:creator>Dawid3</dc:creator>
      <dc:date>2022-05-04T05:45:50Z</dc:date>
    </item>
  </channel>
</rss>

