BookmarkSubscribeRSS Feed
Acf2
Obsidian | Level 7

Is there any mechanism to query a history of SAS\Studio activity?

When ' Continue where you left off' is specified in Startup preferences, where are the details stored?

 

Somewhere, I saw a reference to  %AppData%\SAS\SASStudio\preferences\ but I don't have that location. 

 

SAS release: 9.04.01M8P01182023
SAS platform: X64_SRV19 WIN

 

3 REPLIES 3
Acf2
Obsidian | Level 7
On the server, I have found %APPDATA%\Roaming\SAS\SASStudio\preferences\editTabContentPane.SWE.lastTabs.key which looks promising but there are lots of references to the same SAS program names and '~ps' is equivalent to '\'.
Acf2
Obsidian | Level 7
libname lasttabs json '%APPDATA%\Roaming\SAS\SASStudio\preferences\editTabContentPane.SWE.lastTabs.key' ; works nicely. There are useful values in name, uri and ModifiedDate which is in millisecs (from 1970?). More work needed.
Acf2
Obsidian | Level 7

The JSON has a bunch of info which may be better but this primitive approach seems to be working over the past few weeks :

 

libname lasttabs clear ;
libname lasttabs json "%sysget(APPDATA)\SAS\SASStudio\preferences\editTabContentPane.SWE.lastTabs.key" ;

data work.recent_progs (keep = nowdt uriparent name moddt) ;
set lasttabs.maintabs ;
JSONstringSecs = input(modifieddate, 13.) / 1000 ;
moddt = JSONstringSecs + intnx('second','01jan1960:00:00:00'dt,'01jan1970:00:00:00'dt) ;
nowdt = datetime() ;
format nowdt B8601DT15. ;
run ;

proc sql ;
create table mydata.prev_progs as
select * from mydata.recent_progs ;

insert into mydata.recent_progs
select * from work.recent_progs
where name not in
(select distinct name from mydata.prev_progs) ;

select nowdt
, uriparent
, name
, moddt format = datetime.
from mydata.recent_progs
order by 3 desc
;
quit ;

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 704 views
  • 0 likes
  • 1 in conversation