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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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
  • 1540 views
  • 0 likes
  • 1 in conversation