Your SAS programs, embedded in web apps and elsewhere

SP: Getting WRS-Report name(just like METAUSER for username)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

SP: Getting WRS-Report name(just like METAUSER for username)

Hello,

I want to create an observation in a table each time a report is opened/refreshed in WRS with time, username and report name.

Time and username I already have, but I don't find anything on the net for the report name, doas anyone have a clue?

Can I get the report name through GETOPTION or METADATA_GETATTR somehow?

Here's the code for the SP, the SP is added in the information map:

%macro SAS_Report_Hit_Log;

    %let _timestamp  = %sysfunc(DATETIME());

    %let _metauser   = %scan(%sysfunc(getoption(METAUSER)),1,'@');

    %let _reportname = %scan(%sysfunc(getoption(???)),1,'@');

    proc sql;

        INSERT INTO PROD.CTL_SAS_REPORT_MONITORING

        (Timestamp, Username, ReportName)

        VALUES(&_timestamp, "&_metauser", "&_reportname");

    quit;

%mend SAS_Report_Hit_Log;

%SAS_Report_Hit_Log;

Thanks in advance,

Kind regards,

André


Accepted Solutions
Solution
‎02-24-2012 03:49 PM
Occasional Contributor
Posts: 6

Re: SP: Getting WRS-Report name(just like METAUSER for username)

Hello NN,

thanks a lot for your answer, i will check the keyActions.log.

I already parse the jboss server.log for user logins, maybe the

keyActions.log can be parsed the same way.

Yes, I could put it in the prompt for each Infomap,

or I could create a SP for each report hard-coding the report name,

and it would work both ways, but there has to be an easier way.

Getting a report about which reports are used most by my users

is all I want, maybe this functionality is already hidden somewhere,

I just don't see it.

Have a nice weekend,

Kind regards,

André

View solution in original post


All Replies
Regular Contributor
Regular Contributor
Posts: 166

SP: Getting WRS-Report name(just like METAUSER for username)

Hi,

I am sorry i donot have an exact solution for your request..

But i thought there were server logs which were available which would have given you all the information that you were looking for..

A sasnote which i felt was somewhat in the same lines is http://support.sas.com/kb/39/510.html

And a roundaout solution which comes to my mind if nothing else works is to define condition in your Infomap which will contain the report name and then use it in the Prompt for the STP

.....

Solution
‎02-24-2012 03:49 PM
Occasional Contributor
Posts: 6

Re: SP: Getting WRS-Report name(just like METAUSER for username)

Hello NN,

thanks a lot for your answer, i will check the keyActions.log.

I already parse the jboss server.log for user logins, maybe the

keyActions.log can be parsed the same way.

Yes, I could put it in the prompt for each Infomap,

or I could create a SP for each report hard-coding the report name,

and it would work both ways, but there has to be an easier way.

Getting a report about which reports are used most by my users

is all I want, maybe this functionality is already hidden somewhere,

I just don't see it.

Have a nice weekend,

Kind regards,

André

Super Contributor
Posts: 356

SP: Getting WRS-Report name(just like METAUSER for username)

Have a look at SAS Aduit Monitoring and performance (APM), it contains a out of the box report for top ten reports.... you can modify that to add user etc.

The APM Creates an artifacts table which contains all the KeyAction details, and other logs - parses logs nightly...

A little bit fiddly to set up if on multiple machines but instructions are good.

Barry

Occasional Contributor
Posts: 6

SP: Getting WRS-Report name(just like METAUSER for username)

Posted in reply to twocanbazza

Hello Barry,

thanks for your tip, I will look into SAS APM.

Kind regards,

André

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 676 views
  • 6 likes
  • 3 in conversation