pathsas

SAS Modified Program Date/Time


There are multiple .sas programs saved in multiple folders on the SAS Server (Servers > SASApp > Home > Run 1 etc)

Is there a way I can check the last modified date for all of these programs at once? I know there is the dictionary.tables code but I think that's just for Libraries and not a filepath?

Also - is there a way to easily backup these programs?


Solution

  • If the goal is to just find information about files then you can use the FINFO() function. That will work assuming the path Enterprise Guide is showing you is available on the machine were SAS itself is running.

    For example see this macro: https://github.com/sasutils/macros/blob/master/dirtree.sas

    For example you could use this call

    %dirtree(/sasp/home/TEAM,out=sas_files)
    

    to make a dataset with every file in that directory tree.

    You could then subset to the files of interest. For example if you want the files that end with .sas you might do something like:

    data sas_programs;
       set sas_files;
       where scan(filename,-1,'.') = 'sas';
    run;