<?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 SAS log: report permanent data sets read / SQL procedure in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342265#M272817</link>
    <description>&lt;P&gt;This probably falls into the category of "no" or petition SI.&amp;nbsp; Does SAS have an option to report whether a data step or procedured read from a (permanent) data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;323 proc sql ;&lt;/P&gt;
&lt;P&gt;324 select count( * )&lt;/P&gt;
&lt;P&gt;325 from sdtm.dm&lt;/P&gt;
&lt;P&gt;326 ;&lt;/P&gt;
&lt;P&gt;327 quit ;&lt;/P&gt;
&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;328&lt;/P&gt;
&lt;P&gt;329 data _null_ ;&lt;/P&gt;
&lt;P&gt;330 set sdtm.dm nobs = nobs ;&lt;/P&gt;
&lt;P&gt;331 put nobs= ;&lt;/P&gt;
&lt;P&gt;332 stop ;&lt;/P&gt;
&lt;P&gt;333 run ;&lt;/P&gt;
&lt;P&gt;nobs=43&lt;/P&gt;
&lt;P&gt;NOTE: There were 1 observations read from the data set &lt;FONT color="#ff00ff"&gt;SDTM.DM&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;334&lt;/P&gt;
&lt;P&gt;335 data _null_ ;&lt;/P&gt;
&lt;P&gt;336 if 0 then set sdtm.dm nobs = nobs ;&lt;/P&gt;
&lt;P&gt;337 put nobs= ;&lt;/P&gt;
&lt;P&gt;338 stop ;&lt;/P&gt;
&lt;P&gt;339 run ;&lt;/P&gt;
&lt;P&gt;nobs=43&lt;/P&gt;
&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see no fool proof method of parsing the log to obtain such information unless the NOTE reports it.&amp;nbsp; Users can use macros and macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to have my programmers report all data sets and files used by a program, but they are not consistent.&amp;nbsp; Since I perfrom a log check, I thought I would just glean this information from the log, but the SQL procedure and the case when the program uses the metadata but does not read an observation are problematic.&amp;nbsp; Procedures like MIXED do not seem to report the data set used to the log, but rather to the PRINT destination, which is of no use if the LISTING destination is closed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
    <pubDate>Sat, 18 Mar 2017 19:30:22 GMT</pubDate>
    <dc:creator>KevinViel</dc:creator>
    <dc:date>2017-03-18T19:30:22Z</dc:date>
    <item>
      <title>SAS log: report permanent data sets read / SQL procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342265#M272817</link>
      <description>&lt;P&gt;This probably falls into the category of "no" or petition SI.&amp;nbsp; Does SAS have an option to report whether a data step or procedured read from a (permanent) data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;323 proc sql ;&lt;/P&gt;
&lt;P&gt;324 select count( * )&lt;/P&gt;
&lt;P&gt;325 from sdtm.dm&lt;/P&gt;
&lt;P&gt;326 ;&lt;/P&gt;
&lt;P&gt;327 quit ;&lt;/P&gt;
&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;328&lt;/P&gt;
&lt;P&gt;329 data _null_ ;&lt;/P&gt;
&lt;P&gt;330 set sdtm.dm nobs = nobs ;&lt;/P&gt;
&lt;P&gt;331 put nobs= ;&lt;/P&gt;
&lt;P&gt;332 stop ;&lt;/P&gt;
&lt;P&gt;333 run ;&lt;/P&gt;
&lt;P&gt;nobs=43&lt;/P&gt;
&lt;P&gt;NOTE: There were 1 observations read from the data set &lt;FONT color="#ff00ff"&gt;SDTM.DM&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;　&lt;/P&gt;
&lt;P&gt;334&lt;/P&gt;
&lt;P&gt;335 data _null_ ;&lt;/P&gt;
&lt;P&gt;336 if 0 then set sdtm.dm nobs = nobs ;&lt;/P&gt;
&lt;P&gt;337 put nobs= ;&lt;/P&gt;
&lt;P&gt;338 stop ;&lt;/P&gt;
&lt;P&gt;339 run ;&lt;/P&gt;
&lt;P&gt;nobs=43&lt;/P&gt;
&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;
&lt;P&gt;real time 0.00 seconds&lt;/P&gt;
&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see no fool proof method of parsing the log to obtain such information unless the NOTE reports it.&amp;nbsp; Users can use macros and macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to have my programmers report all data sets and files used by a program, but they are not consistent.&amp;nbsp; Since I perfrom a log check, I thought I would just glean this information from the log, but the SQL procedure and the case when the program uses the metadata but does not read an observation are problematic.&amp;nbsp; Procedures like MIXED do not seem to report the data set used to the log, but rather to the PRINT destination, which is of no use if the LISTING destination is closed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kevin&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 19:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342265#M272817</guid>
      <dc:creator>KevinViel</dc:creator>
      <dc:date>2017-03-18T19:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS log: report permanent data sets read / SQL procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342276#M272818</link>
      <description>&lt;P&gt;Use PROC SCAPROC to output a trace of the programs, if all programmers use this the output is standardized and you can write custom scripts to parse the output to your hearts desire.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Plus here's some code to get you started in parsing the output:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/58/047.html" target="_blank"&gt;http://support.sas.com/kb/58/047.html&lt;/A&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 21:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342276#M272818</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-18T21:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS log: report permanent data sets read / SQL procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342308#M272819</link>
      <description>&lt;P&gt;I don't believe there is any fool proof method to achieve what you're after using SAS logs. Example: If you access a view then best you get in the log is the name of the view but not which tables the view accessed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use some OS monitoring tool to collect stats which &lt;SPAN&gt;.sas7bdat files &lt;/SPAN&gt;get accessed how often&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2017 01:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-log-report-permanent-data-sets-read-SQL-procedure/m-p/342308#M272819</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-03-19T01:41:38Z</dc:date>
    </item>
  </channel>
</rss>

