I would like if possible to arrange (for a while) for all EG sessions from all users to use SCAPROC logging. I've modified the workspace server configuration so that this happens, in principle. But in practice, nothing useful gets written to the SCAPROC logs. It looks as though EG is taking steps to disable SCAPROC logging. (This may be because EG's own "analyse program" facility uses Proc SCAPROC itself, and SCAPROC logging of SCAPROC logging would be unrewarding.) Does anyone know a way around this please?
I don't think that EG is doing anything explicitly to disable SCAPROC. But can you share the details of how you configured this?
It could be that by specifying PROC SCAPROC RECORD in a startup script, the directive is actually taking effect in a sub-environment of the SAS Workspace and not affecting the jobs you submit with EG. Or, it could be that EG's habit of including QUIT; statements (to close off certain procs) is interrupting your SCAPROC flow.
SCAPROC output can be quite verbose. Can you share what you're trying to do? Are you trying to log which data sources are touched, which PROCs are used, or just in general trying to produce an inventory of how your users are using SAS? Monitoring and logging with SAS Environment Manager might help.
Chris
Thanks, Chris, for the rapid response!
The objective is to find out what data the users are really using. I'm aware that the SCA logs are pretty verbose, but I've already written code to analyse them.
The way I've configured it is, within the workspace server, to modify sasv9_usermods.cfg so that it includes INITSMT and TERMSTMT options. I'm generating files with names that include usernames and timestamps, but essentially the initialisation code is "proc scaproc; record 'filename' attr run;", followed by a data _null_ step for safety, and the termination code is "proc scaproc; write; run;".
Log files are being generated, but they do not contain any information about code run using EG. It appears that the termination code is being executed, and the SCA log generated, before EG runs any user code.
This is a SAS 9.3 system, so Environment Manager is not available.
Bob
I'm not sure that INITSTMT and TERMSTMT operate the same way when SAS is running in "object server" mode, which is how a SAS Workspace runs. I think in order to achieve what you want, you would need to submit PROC SCAPROC from EG after it connects to the server. You can specify that in Tools->Options->SAS Programs, but that's a change for each user. And there isn't a "submit these statements before disconnecting" option to match up with it, so you would simply have to add the PROC SCAPROC WRITE statement from EG at the right time, when you're ready to be finished. All of this depends on behavior from your end users, which you are probably trying to avoid.
Maybe you could petition your users to run their jobs like this for a day or for a week so that you can collect these metrics as an audit. You would have to test my suggested approach with one or two willing participants. Or perhaps you'll need to look at other SAS logging methods that indicate data access. I'd suggest APM, but that package has been deprecated for pre-9.4 releases.
Chris
I think the way forward here is going to be for us to get individual users to set the appropriate EG options to generate the SCA logs for us. Thanks to both Chris and Paul for their helpful responses.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.