BookmarkSubscribeRSS Feed
ashasupriya
Obsidian | Level 7

Hi All,

I support the higher education institute as an administrator. We have about 400 plus SAS users who have been granted access to SAS and pull their departmental data/Student information that they are interested in. We are in the process of evaluating who all are genuinely needing access from the existing system and rest can be revoked. So I need to find out all the users who have not logged in for the past 3 months or so that will help me to have a yearly purging of users process in place.

Appreciate any lead on this.

 

Regards,

Asha

5 REPLIES 5
KachiM
Rhodochrosite | Level 12

It will be easy for both of us to work on some sample Data set. Give a mock data set and its derived output. 

ashasupriya
Obsidian | Level 7

Thank you datasp.

I can obtain the list of all SAS users in a spreadsheet with the column names like shown below:
App_UserId ( Employee Id@eid ex. A1234555@eid)
Comp_EID (company domain id with format First letter of the first name and employee ID. ex A1234555)
Person_Id (Employee ID, ex. 1234555)
Name
Description
Title
DisplayName
Status
Last_ChgOper
Last_ChgDate
Internal_Number

 

Below is the purge program I use to remove the terminated users.
We receive all terminated users list from the tool collaborated with HR information daily. I modify the filename with the date and update the date macro in the below sas program to reflect the file that is going to be imported.
If there is any terminated users in the current user list then I go and delete the user from SAS management console manually.

 

data APPS_current_user;
set DataReq.APPS_Users ;
run;

 

/*Change the date daily*/

%LET date = 072619;

DATA A70_term_user;
INFILE "D:\PROJECTS\APPS\Terminated users daily log\Raw Data\A70_TERM_USERS_&date..xls" DLM='09'x DSD MISSOVER LRECL=32767 firstobs=4;
Length Person_Id
c_User_ID $7.
c_Name $25.
c_Status $3.
c_Term_Date $10.
c_End_Date $10.
c_Expire_Date $10.
c_OS_Role $10.
;

 

Input Person_Id
c_User_ID $
c_Name $
c_Status $
c_Term_Date $
c_End_Date $
c_Expire_Date $
c_OS_Role $
;
RUN;

 

Proc sort data=APPS_Current_user;
by Person_id;
run;

Proc Sort data=A70_term_user;
by Person_id;
run;

 

Data APPS_Terminate_User_list;
merge APPS_Current_user (in=ina) A70_term_user (in=inb);
if ina and inb;
by person_id;
run;

 

Proc print data=APPS_Terminate_User_list;
title "APPS Terminate users list";
run;

 

KachiM
Rhodochrosite | Level 12

To

"find out all the users who have not logged in for the past 3 months"

 

we need EmployeeID and last LoginDate only. Using the current Date you can find out the time interval of interest. That will give the list of users who have not logged for the past n-months. It is a simple program only.

 

ashasupriya
Obsidian | Level 7

Thank you KurtBremser. I will take a look at it.

 

Regards,
Asha

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 562 views
  • 0 likes
  • 3 in conversation