<?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: Trying to read the SAS ECM logs to capture the login details in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/526840#M143562</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;Only the members of a certain group are captured in the dataset.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's hard to reply without seeing the data, but my first thought is that only the members of this group match your logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A comment:&amp;nbsp;The PAD option on the INFILE statement is often useful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jan 2019 03:20:55 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-01-14T03:20:55Z</dc:date>
    <item>
      <title>Trying to read the SAS ECM logs to capture the login details</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/515581#M139133</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read SAS ECM log file in order to capture the login and logoff time.&lt;/P&gt;&lt;P&gt;I was successful to read the SAS ECM log file using a sas data step.&lt;/P&gt;&lt;P&gt;But I am not sure why I am not able to capture all the events from the log file into SAS dataset. Only the members of a certain group are captured in the dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the below code to read the log file and process it further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Determine list of files to analyze */&lt;BR /&gt;&amp;nbsp;%let start_dt=01JAN2018;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/*&amp;nbsp;%let log_path=/tmp/logs_workarea/xxxServer8_1;*/&lt;BR /&gt;&amp;nbsp;/*&amp;nbsp;%let log_path=/workspace/wfeaa/sasdata/xxx/logs/;*/&lt;BR /&gt;&amp;nbsp;%let log_path=/workspace/wfeaa/sasdata/xxx/logs/midtier_replica;&lt;BR /&gt;&amp;nbsp;filename flist pipe "ls &amp;amp;log_path.";&lt;/P&gt;&lt;P&gt;&amp;nbsp;data step01(keep=fpath);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;length fname $255;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;infile flist;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;input fname $;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;last_word=input(scan(fname,-1,'.'),yymmdd10.);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;fpath="&amp;amp;log_path./"||fname;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;if last_word= '.' or last_word ge "&amp;amp;start_dt."d then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;output;&lt;BR /&gt;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/* Get relevant records from log files */&lt;BR /&gt;&amp;nbsp;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;set step01;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;call execute&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;("&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;filename logrecs pipe 'more "||fpath||" | grep com.sas.solutions.casemgmt.util.AppSessionContext';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;data step02;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;length instr $1000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;infile logrecs lrecl=1000 dlm='7F'x missover truncover dsd;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;input instr $;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if find(instr,'INFO') then output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;proc append base=step03 data=step02;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;run;");&lt;BR /&gt;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;create table step04 as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;select instr, name, displayname&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;from step03&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;left join person on instr contains displayname&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;having displayname ne '';&lt;BR /&gt;&amp;nbsp;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;/* Analyze log files */&lt;BR /&gt;&amp;nbsp;DATA WORK.INPUT_L (DROP=&amp;nbsp; instr DT dt1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;set step04;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;IF (FIND(instr, '- Creating session context for user,')) GE 1 THEN&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DO;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DT=Substr(instr,21,16);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Login_tme=input(DT,anydtdtm23.);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FORMAT Login_tme DateTime23.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;IF (FIND(instr, 'Clearing session context for user')) GE 1 THEN&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DO;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DT1=Substr(instr,21,16);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LogOff_tme=input(DT1,anydtdtm23.);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Format LogOff_tme DateTime23.;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;END;&lt;BR /&gt;&amp;nbsp;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me on this. I am not able to read all the users who have logged in to SAS ECM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 15:39:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/515581#M139133</guid>
      <dc:creator>Santt0sh</dc:creator>
      <dc:date>2018-11-23T15:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to read the SAS ECM logs to capture the login details</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/526840#M143562</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;Only the members of a certain group are captured in the dataset.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's hard to reply without seeing the data, but my first thought is that only the members of this group match your logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A comment:&amp;nbsp;The PAD option on the INFILE statement is often useful&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 03:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/526840#M143562</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-01-14T03:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to read the SAS ECM logs to capture the login details</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/526842#M143563</link>
      <description>&lt;P&gt;Does your person dataset&amp;nbsp;contain&amp;nbsp; all of the people you are interested in, and do they all have a displayname ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 03:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/526842#M143563</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2019-01-14T03:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to read the SAS ECM logs to capture the login details</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/528161#M144107</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply,&lt;/P&gt;&lt;P&gt;I have managed to get the log in details of the Users.&lt;/P&gt;&lt;P&gt;The code which i had posted above works fine, there was a small mistake while copying the log files from Mid-tier to the Compute - tier.&lt;/P&gt;&lt;P&gt;we were using the Dev Host name&amp;nbsp; on SIT environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all the suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 21:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/528161#M144107</guid>
      <dc:creator>Santt0sh</dc:creator>
      <dc:date>2019-01-17T21:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to read the SAS ECM logs to capture the login details</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/585401#M166936</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183704"&gt;@Santt0sh&lt;/a&gt;&amp;nbsp; - please share on mid tier from which log we can extract the ECM users login information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kaushal Solanki&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2019 09:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-read-the-SAS-ECM-logs-to-capture-the-login-details/m-p/585401#M166936</guid>
      <dc:creator>kaushalsolanki</dc:creator>
      <dc:date>2019-08-31T09:38:57Z</dc:date>
    </item>
  </channel>
</rss>

