Macros for SAS Application Developers
https://github.com/sasjs/core
mp_stprequests.sas File Reference

Capture session start / finish times and request details. More...

Go to the source code of this file.

Detailed Description

For details, see https://rawsas.com/event-logging-of-stored-process-server-sessions. Requires a base table in the following structure (name can be changed):

proc sql; create table &libds( request_dttm num not null format=datetime. ,status_cd char(4) not null ,_metaperson varchar(100) not null ,_program varchar(500) ,sysuserid varchar(50) ,sysjobid varchar(12) ,_sessionid varchar(50) );

Called via STP init / term events (configurable in SMC) as follows:

mp_stprequests(status_cd=INIT, libds=YOURLIB.DATASET )

Parameters
[in]status_cd=Use INIT for INIT and TERM for TERM events
[in]libds=(somelib.stp_requests) Location of base table (library.dataset). To minimise risk of table locks, we HIGHLY recommend using a database (NOT a SAS dataset). THE LIBRARY SHOULD BE ASSIGNED ALREADY - eg in autoexec or earlier in the init program proper.
Version
9.2
Author
Allan Bowe @source https://github.com/sasjs/core

Definition in file mp_stprequests.sas.