<?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: scanning a log file and creating results in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509851#M1845</link>
    <description>&lt;P&gt;Since you're already reading the dictionary table to get the list of data set names, seems like it might be easier to use the dictionary table to create a data set with the names and record counts, rather than parse the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to upcase() libname or memname because they are stored upper case, and adding upcase() can sometimes slow down queries, because it can't use indexes (I believe, haven't tested recently).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create table want as
  select memname, nlobs
  from dictionary.tables
  where libname="TEST"
  and memname like "COMPARE_%"
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 02 Nov 2018 13:23:43 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2018-11-02T13:23:43Z</dc:date>
    <item>
      <title>scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509742#M1816</link>
      <description>&lt;P&gt;I would like to extract the record count, dataset name, year and month from log files into a SAS dataset.&lt;/P&gt;&lt;P&gt;An example of a log after SAS has finished processing is below.&amp;nbsp; How can I achieve the requested information by examine saved logs.&lt;/P&gt;&lt;P&gt;Thank you for your assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;14180 proc sql ;&lt;BR /&gt;14181 /* get all the file names into a macro var */&lt;BR /&gt;14182 select&lt;BR /&gt;14183 trim(libname) || '.' || memname into :dataset_vars separated by ' '&lt;BR /&gt;14184 from dictionary.tables&lt;BR /&gt;14185 where upcase(libname)="TEST"&lt;BR /&gt;14186 and upcase(memname) like 'COMPARE_%'&lt;BR /&gt;14187 ;&lt;BR /&gt;14188&lt;BR /&gt;14189 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 8.62 seconds&lt;BR /&gt;cpu time 0.82 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;14190&lt;BR /&gt;14191 data RESULTS;&lt;BR /&gt;14192 set &amp;amp;dataset_vars;* (drop=month);&lt;BR /&gt;14193 run;&lt;/P&gt;&lt;P&gt;NOTE: There were 812 observations read from the data set TEST.COMPARE_199910.&lt;BR /&gt;NOTE: There were 808 observations read from the data set TEST.COMPARE_199911.&lt;BR /&gt;NOTE: There were 620 observations read from the data set TEST.COMPARE_199912.&lt;BR /&gt;NOTE: There were 876 observations read from the data set TEST.COMPARE_200001.&lt;BR /&gt;NOTE: There were 868 observations read from the data set TEST.COMPARE_200002.&lt;BR /&gt;NOTE: There were 764 observations read from the data set TEST.COMPARE_200003.&lt;BR /&gt;NOTE: There were 708 observations read from the data set TEST.COMPARE_200004.&lt;BR /&gt;NOTE: There were 924 observations read from the data set TEST.COMPARE_200005.&lt;BR /&gt;NOTE: There were 1300 observations read from the data set TEST.COMPARE_200006.&lt;BR /&gt;NOTE: There were 868 observations read from the data set TEST.COMPARE_200007.&lt;BR /&gt;NOTE: There were 1056 observations read from the data set TEST.COMPARE_200008.&lt;BR /&gt;NOTE: There were 1952 observations read from the data set TEST.COMPARE_200009.&lt;BR /&gt;NOTE: There were 1040 observations read from the data set TEST.COMPARE_200010.&lt;BR /&gt;NOTE: There were 860 observations read from the data set TEST.COMPARE_200011.&lt;BR /&gt;NOTE: There were 620 observations read from the data set TEST.COMPARE_200012.&lt;BR /&gt;NOTE: There were 1264 observations read from the data set TEST.COMPARE_200101.&lt;BR /&gt;NOTE: There were 880 observations read from the data set TEST.COMPARE_200102.&lt;BR /&gt;NOTE: There were 1104 observations read from the data set TEST.COMPARE_200103.&lt;BR /&gt;NOTE: There were 1060 observations read from the data set TEST.COMPARE_200104.&lt;BR /&gt;NOTE: There were 1040 observations read from the data set TEST.COMPARE_200105.&lt;BR /&gt;NOTE: There were 1220 observations read from the data set TEST.COMPARE_200106.&lt;BR /&gt;NOTE: There were 437464 observations read from the data set TEST.COMPARE_200107.&lt;BR /&gt;NOTE: There were 439933 observations read from the data set TEST.COMPARE_200108.&lt;BR /&gt;NOTE: There were 438241 observations read from the data set TEST.COMPARE_200109.&lt;BR /&gt;NOTE: There were 421961 observations read from the data set TEST.COMPARE_200110.&lt;BR /&gt;NOTE: There were 394679 observations read from the data set TEST.COMPARE_200111.&lt;BR /&gt;NOTE: There were 373612 observations read from the data set TEST.COMPARE_200112.&lt;BR /&gt;NOTE: There were 1072 observations read from the data set TEST.COMPARE_200201.&lt;BR /&gt;NOTE: There were 968 observations read from the data set TEST.COMPARE_200202.&lt;BR /&gt;NOTE: There were 1044 observations read from the data set TEST.COMPARE_200203.&lt;BR /&gt;NOTE: There were 1088 observations read from the data set TEST.COMPARE_200204.&lt;BR /&gt;NOTE: There were 972 observations read from the data set TEST.COMPARE_200205.&lt;BR /&gt;NOTE: There were 1728 observations read from the data set TEST.COMPARE_200206.&lt;BR /&gt;NOTE: There were 1468 observations read from the data set TEST.COMPARE_200207.&lt;BR /&gt;NOTE: There were 1280 observations read from the data set TEST.COMPARE_200208.&lt;BR /&gt;NOTE: There were 1652 observations read from the data set TEST.COMPARE_200209.&lt;BR /&gt;NOTE: There were 1208 observations read from the data set TEST.COMPARE_200210.&lt;BR /&gt;NOTE: There were 1032 observations read from the data set TEST.COMPARE_200211.&lt;BR /&gt;NOTE: There were 712 observations read from the data set TEST.COMPARE_200212.&lt;BR /&gt;NOTE: There were 912 observations read from the data set TEST.COMPARE_200301.&lt;BR /&gt;NOTE: There were 852 observations read from the data set TEST.COMPARE_200302.&lt;BR /&gt;NOTE: There were 1032 observations read from the data set TEST.COMPARE_200303.&lt;BR /&gt;NOTE: There were 1092 observations read from the data set TEST.COMPARE_200304.&lt;BR /&gt;NOTE: There were 952 observations read from the data set TEST.COMPARE_200305.&lt;BR /&gt;NOTE: There were 1636 observations read from the data set TEST.COMPARE_200306.&lt;BR /&gt;NOTE: There were 1316 observations read from the data set TEST.COMPARE_200307.&lt;BR /&gt;NOTE: There were 1212 observations read from the data set TEST.COMPARE_200308.&lt;BR /&gt;NOTE: There were 1696 observations read from the data set TEST.COMPARE_200309.&lt;BR /&gt;NOTE: There were 1212 observations read from the data set TEST.COMPARE_200310.&lt;BR /&gt;NOTE: There were 852 observations read from the data set TEST.COMPARE_200311.&lt;BR /&gt;NOTE: There were 820 observations read from the data set TEST.COMPARE_200312.&lt;BR /&gt;NOTE: There were 944 observations read from the data set TEST.COMPARE_200401.&lt;BR /&gt;NOTE: There were 1048 observations read from the data set TEST.COMPARE_200402.&lt;BR /&gt;NOTE: There were 1332 observations read from the data set TEST.COMPARE_200403.&lt;BR /&gt;NOTE: There were 1120 observations read from the data set TEST.COMPARE_200404.&lt;BR /&gt;NOTE: There were 1040 observations read from the data set TEST.COMPARE_200405.&lt;BR /&gt;NOTE: There were 1992 observations read from the data set TEST.COMPARE_200406.&lt;BR /&gt;NOTE: There were 1420 observations read from the data set TEST.COMPARE_200407.&lt;BR /&gt;NOTE: There were 1468 observations read from the data set TEST.COMPARE_200408.&lt;BR /&gt;NOTE: There were 1816 observations read from the data set TEST.COMPARE_200409.&lt;BR /&gt;NOTE: There were 1220 observations read from the data set TEST.COMPARE_200410.&lt;BR /&gt;NOTE: There were 1232 observations read from the data set TEST.COMPARE_200411.&lt;BR /&gt;NOTE: There were 1004 observations read from the data set TEST.COMPARE_200412.&lt;BR /&gt;NOTE: There were 1272 observations read from the data set TEST.COMPARE_200501.&lt;BR /&gt;NOTE: There were 1028 observations read from the data set TEST.COMPARE_200502.&lt;BR /&gt;NOTE: There were 1104 observations read from the data set TEST.COMPARE_200503.&lt;BR /&gt;NOTE: There were 1132 observations read from the data set TEST.COMPARE_200504.&lt;BR /&gt;NOTE: There were 1000 observations read from the data set TEST.COMPARE_200505.&lt;BR /&gt;NOTE: There were 1788 observations read from the data set TEST.COMPARE_200506.&lt;BR /&gt;NOTE: There were 1412 observations read from the data set TEST.COMPARE_200507.&lt;BR /&gt;NOTE: There were 1648 observations read from the data set TEST.COMPARE_200508.&lt;BR /&gt;NOTE: There were 1876 observations read from the data set TEST.COMPARE_200509.&lt;BR /&gt;NOTE: There were 1156 observations read from the data set TEST.COMPARE_200510.&lt;BR /&gt;NOTE: There were 1108 observations read from the data set TEST.COMPARE_200511.&lt;BR /&gt;NOTE: There were 916 observations read from the data set TEST.COMPARE_200512.&lt;BR /&gt;NOTE: There were 1224 observations read from the data set TEST.COMPARE_200601.&lt;BR /&gt;NOTE: There were 1292 observations read from the data set TEST.COMPARE_200602.&lt;BR /&gt;NOTE: There were 1420 observations read from the data set TEST.COMPARE_200603.&lt;BR /&gt;NOTE: There were 1396 observations read from the data set TEST.COMPARE_200604.&lt;BR /&gt;NOTE: There were 1300 observations read from the data set TEST.COMPARE_200605.&lt;BR /&gt;NOTE: There were 2264 observations read from the data set TEST.COMPARE_200606.&lt;BR /&gt;NOTE: There were 1708 observations read from the data set TEST.COMPARE_200607.&lt;BR /&gt;NOTE: There were 1672 observations read from the data set TEST.COMPARE_200608.&lt;BR /&gt;NOTE: There were 2392 observations read from the data set TEST.COMPARE_200609.&lt;BR /&gt;NOTE: There were 1608 observations read from the data set TEST.COMPARE_200610.&lt;BR /&gt;NOTE: There were 1188 observations read from the data set TEST.COMPARE_200611.&lt;BR /&gt;NOTE: There were 1064 observations read from the data set TEST.COMPARE_200612.&lt;BR /&gt;NOTE: There were 1744 observations read from the data set TEST.COMPARE_200701.&lt;BR /&gt;NOTE: There were 1732 observations read from the data set TEST.COMPARE_200702.&lt;BR /&gt;NOTE: There were 1784 observations read from the data set TEST.COMPARE_200703.&lt;BR /&gt;NOTE: There were 1752 observations read from the data set TEST.COMPARE_200704.&lt;BR /&gt;NOTE: There were 1740 observations read from the data set TEST.COMPARE_200705.&lt;BR /&gt;NOTE: There were 2516 observations read from the data set TEST.COMPARE_200706.&lt;BR /&gt;NOTE: There were 2204 observations read from the data set TEST.COMPARE_200707.&lt;BR /&gt;NOTE: There were 2248 observations read from the data set TEST.COMPARE_200708.&lt;BR /&gt;NOTE: There were 2724 observations read from the data set TEST.COMPARE_200709.&lt;BR /&gt;NOTE: There were 1916 observations read from the data set TEST.COMPARE_200710.&lt;BR /&gt;NOTE: There were 1736 observations read from the data set TEST.COMPARE_200711.&lt;BR /&gt;NOTE: There were 1448 observations read from the data set TEST.COMPARE_200712.&lt;BR /&gt;NOTE: There were 1924 observations read from the data set TEST.COMPARE_200801.&lt;BR /&gt;NOTE: There were 1528 observations read from the data set TEST.COMPARE_200802.&lt;BR /&gt;NOTE: There were 1900 observations read from the data set TEST.COMPARE_200803.&lt;BR /&gt;NOTE: There were 1864 observations read from the data set TEST.COMPARE_200804.&lt;BR /&gt;NOTE: There were 1912 observations read from the data set TEST.COMPARE_200805.&lt;BR /&gt;NOTE: There were 3476 observations read from the data set TEST.COMPARE_200806.&lt;BR /&gt;NOTE: There were 2432 observations read from the data set TEST.COMPARE_200807.&lt;BR /&gt;NOTE: There were 2384 observations read from the data set TEST.COMPARE_200808.&lt;BR /&gt;NOTE: There were 3144 observations read from the data set TEST.COMPARE_200809.&lt;BR /&gt;NOTE: There were 1840 observations read from the data set TEST.COMPARE_200810.&lt;BR /&gt;NOTE: There were 1380 observations read from the data set TEST.COMPARE_200811.&lt;BR /&gt;NOTE: There were 1168 observations read from the data set TEST.COMPARE_200812.&lt;BR /&gt;NOTE: There were 960 observations read from the data set TEST.COMPARE_200901.&lt;BR /&gt;NOTE: There were 56 observations read from the data set TEST.COMPARE_200902.&lt;BR /&gt;NOTE: There were 4 observations read from the data set TEST.COMPARE_200903.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200904.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200905.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200906.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200907.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200908.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200909.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200910.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200911.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_200912.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201001.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201002.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201003.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201004.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201005.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201006.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201007.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201008.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201009.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201010.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201011.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201012.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201101.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201102.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201103.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201104.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201105.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201106.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201107.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201108.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201109.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201110.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201111.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201112.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201201.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201202.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201203.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201204.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201205.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201206.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201207.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201208.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201209.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201210.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201211.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201212.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201301.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201302.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201303.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201304.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201305.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201306.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201307.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201308.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201309.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201310.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201311.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201312.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201401.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201402.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201403.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201404.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201405.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201406.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201407.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201408.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201409.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201410.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201411.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201412.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201501.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201502.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201503.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201504.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201505.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201506.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201507.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201508.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201509.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201510.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201511.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201512.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201601.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201602.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201603.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201604.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201605.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201606.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201607.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201608.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201609.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201610.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201611.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201612.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201701.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201702.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201703.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201704.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201705.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201706.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201707.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201708.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201709.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201710.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201711.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201712.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201801.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201802.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201803.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201804.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201805.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201806.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201807.&lt;BR /&gt;NOTE: There were 0 observations read from the data set TEST.COMPARE_201808.&lt;BR /&gt;NOTE: The data set WORK.RESULTS has 2653462 observations and 33 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 56.43 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.25 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 23:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509742#M1816</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-01T23:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509748#M1818</link>
      <description>&lt;P&gt;Sending the log to an external text file and then parsing it from there might be an option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001330273.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001330273.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 00:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509748#M1818</guid>
      <dc:creator>Anthony45</dc:creator>
      <dc:date>2018-11-02T00:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509755#M1821</link>
      <description>And take a quick look at PROC SCAPROC and see what it returns for you. For log parsing tools, search lexjansen.com for code samples, you may have to do some digging to find one that's suitable. You could also try searching on GitHub.</description>
      <pubDate>Fri, 02 Nov 2018 01:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509755#M1821</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-02T01:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509837#M1841</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/140338"&gt;@Anthony45&lt;/a&gt; for the suggestions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While the proc scapproc may work well it currently doesn't fulfill my needs at least with my current understand of the process.&lt;/P&gt;&lt;P&gt;I did get this to work as a chucky dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let myfile "&amp;amp;path.\&amp;amp;file..log";
data junk;
	length junk $255. month $2. year $4. records 8.;
	infile &amp;amp;myfile.;
	input @1 junk $255.;
	test = substr(junk,1,17);
	if test = "NOTE: There were ";
	delims = ' ,.!:';               
	numWords = countw(junk, delims); 
        filename = scan(junk,numWords, delims);
	word2=scan(junk,4,delims);
	records = word2;
	delims = '_';
	numWords = countw(filename,delims);
	mon = scan(filename,numWords,delims);
	year = substr(mon,1,4);
	month = substr(mon,5,2);
	output;
	drop test mon junk word2 numwords delims;
run;

 proc print data=junk2;
 run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 12:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509837#M1841</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-02T12:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509851#M1845</link>
      <description>&lt;P&gt;Since you're already reading the dictionary table to get the list of data set names, seems like it might be easier to use the dictionary table to create a data set with the names and record counts, rather than parse the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need to upcase() libname or memname because they are stored upper case, and adding upcase() can sometimes slow down queries, because it can't use indexes (I believe, haven't tested recently).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create table want as
  select memname, nlobs
  from dictionary.tables
  where libname="TEST"
  and memname like "COMPARE_%"
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Nov 2018 13:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509851#M1845</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-11-02T13:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509923#M1851</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt; that would be perfect for those users whom have access to the datasets paths.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, some&amp;nbsp;users may not have data access, where those users roles may be to only read and process logs for them to create reports for auditing review. &amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have gets me started, but will need a lot of tailoring for future continues usage reading&amp;nbsp;other log statements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you all for your replies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 15:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509923#M1851</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-02T15:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: scanning a log file and creating results</title>
      <link>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509958#M1855</link>
      <description>&lt;P&gt;Fair enough.&amp;nbsp; On a related note, I wrote a paper about monitoring record counts in a SAS job, for similar QC.&amp;nbsp;&lt;A href="https://www.lexjansen.com/nesug/nesug11/ds/ds06.pdf" target="_blank"&gt;https://www.lexjansen.com/nesug/nesug11/ds/ds06.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a macro, you pass it a list of data sets, and it gives you a little report on record counts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ReportObs
 (data= /*space delimited list of data set names*/
 ,out= /*optional name of output data set*/
 ,lib=work
 )
;
proc sql;
 %if %superq(out) ne %str() %then %do;
 create table &amp;amp;out as
 %end;
 select memname as Data
 ,memlabel as Label
 ,nlobs as nObs
 from dictionary.tables
 where libname=%upcase("&amp;amp;lib") and indexw (%upcase("&amp;amp;data"),memname)
 order by indexw (%upcase("&amp;amp;data"),memname)
 ;
quit;
%mend ReportObs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's designed to help detect when records have been accidentally deleted.&amp;nbsp; But it's also useful just for writing a little human-readable report of key record counts at the end of a SAS job.&amp;nbsp; I typically send the report to the log rather than output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But yeah, if the goal is to show that the 'official' counts written by SAS in various log notes are correct, log parsing makes sense.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 16:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/scanning-a-log-file-and-creating-results/m-p/509958#M1855</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2018-11-02T16:41:47Z</dc:date>
    </item>
  </channel>
</rss>

