

5. FILES › 5.2 WEB Information Area (WEB) Files › 5.2.12 Web User Data File (WEBWUD) › 5.2.12.4 WEBWUD Retrieval Examples
5.2.12.4 WEBWUD Retrieval Examples
This section presents a typical WEBWUD retrieval example.
Produce a summary report showing the web request activity
with the application and application function extracted
from the user data field.
Note: The information below is assuming for example sake
that the application name and application function
performed are in the second and third positions in the
user date field and the fields are separated by colons.
/* extract desired data from WEBWRA Detail file and
sort it by SYSID and Enclave Token */
DATA WRA;
SET &WEBX..WEBWRA01;
IF WEBSVRNM = 'myserver';
RUN;
PROC SORT DATA=WRA;
BY SYSID WEBCY;
RUN;
/* extract desired data from WEBWUD Detail file and */
/* sort it by SYSID and Enclave Token */
DATA WUD;
SET &WEBX..WEBWUD01;
IF WEBSVRNM = 'myserver';
RUN;
PROC SORT DATA=WUD;
BY SYSID WEBCY;
RUN;
/* merge the WRA and WUD files and extract from the */
/* user data field WUDFH the application and function */
/* performed */
DATA TEMP;
MERGE WRA (IN=WRA)
WUD (IN=WUD);
BY SYSID WEBCY;
IF WUD THEN DO;
APPL = SCAN(WUDFH,2,':'); /* get application */
FUNC = SCAN(WUDFH,3,':'); /* get function */
END;
IF WUD THEN OUTPUT TEMP;
ELSE RETURN;
RUN;
/* Summarize the merged file /*
%LET BY= SYSID WEBSVRNM APPL FUNC;
%LET BREAK = FUNC;
PROC SORT DATA=TEMP;
BY &BY
RUN;
DATA TEMP2;
SET TEMP;
%WRASUM(SUMBY=&BY,SUMBREAK=&BREAK);
RUN;
/* Print the report */
PROC PRINT DATA=TEMP2 LABEL;
ID SYSID APPL FUNC;
VAR WRACPUTM WRASUPTM WRAZAPTM WRAPRQTM WRADSPTM WRAQTM
WRATRSTM;
LABEL APPL='Application Name'
FUNC='Application Function';
TITLE 'Web Request Application Report';
RUN;
Copyright © 2014 CA.
All rights reserved.
 
|
|