BookmarkSubscribeRSS Feed
BobNewman
Calcite | Level 5

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?

5 REPLIES 5
ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
BobNewman
Calcite | Level 5

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

ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
PaulHomes
Rhodochrosite | Level 12

You might be interested in reviewing the responses to the question where posted a logconfig.xml to capture this information.

BobNewman
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1189 views
  • 6 likes
  • 3 in conversation