Focal Point
Resouce Analyzer Reports

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1537090226

July 10, 2012, 09:46 AM
Prarie
Resouce Analyzer Reports
My Former co-worker created some very complicated reports off Resouce Anaylzer files in 7.6.1. that managment loved. Since upgrading to 7.7.03 they no longer work because the Tables changed. From looking at them it would take quite an undertaking to fix them. I find the canned IBI reports pretty useless in telling who runs what report - when and how often. Anyone have any custom reports off 7.7.03 they would be willing to share? Music
July 10, 2012, 01:48 PM
N.Selph
I modified a few of mine to work off of the new data structure. I don't know how my reports would fit your requirements, though.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
July 10, 2012, 02:26 PM
Prarie
Basically I'm looking to be able run something that tells how often a report was run and who ran it for given period.
July 10, 2012, 04:28 PM
N.Selph
This is how often a report is run and has code to determine the app folder used.
Modify as you see fit, you may just want the second part:
 
-*-INCLUDE wf_env.fex
-* Contents of wf_env:
-SET &WF_ENV = 'DEVELOPMENT';
-SET &WF_SERV = 'MACHINE NAME';
-* End of wf_env

-DEFAULT &OUTPUT=HTML;
-DEFAULT &NUMDAYS=30;
-DEFAULT &FOLDER=FOC_NONE;
-SET &ENDDATE=&YYMD;
-SET &STARTDATE=AYMD(&ENDDATE,-&NUMDAYS,'I8YYMD');

SET ASNAMES=ON
SET HOLDLIST=PRINTONLY

APP LIST HOLD
-RUN
TABLE FILE FOCAPPL
PRINT APPNAME
WHERE APPNAME NOT LIKE '%hub'
WHERE APPNAME NOT LIKE '%tst'
WHERE APPNAME NOT LIKE '%bkup'
WHERE APPNAME NOT LIKE 'ibincc%'
WHERE APPNAME NOT LIKE '%wfex'
WHERE APPNAME NOT LIKE 'ids_sub%'
WHERE NOT APPNAME IN ('ibisamp','tempmap','myrptsinbox','gwinegifs','zzzadmin')
WHERE APPNAME EQ '&FOLDER'
ON TABLE HOLD AS APPFOLD
END

-RUN
-SET &APPS = &LINES;
-TYPE APPS= &APPS
-SET &CTR=1;
-REPEAT ENDREAD &APPS TIMES;
-READ APPFOLD &APPNAME.&CTR.A45.
-*-TYPE APPNAME= &APPNAME.&CTR
-SET &CTR = &CTR+1;
-ENDREAD

DEFINE FILE FOCAPPQ
FOCEXEC/A66=GETTOK(FILENAME, 66, 1, '.', 66, 'A66');
END

-SET &X=1;
-TYPE APPNAME.X= &APPNAME.&X
APP QUERY &APPNAME.&X HOLD
TABLE FILE FOCAPPQ
PRINT FOCEXEC
BY APPNAME AS 'FOLDERNAME'
WHERE FILENAME LIKE '%.fex'
ON TABLE HOLD AS THISTIME
END
-RUN
-IF &APPS EQ 1 GOTO ENDPROC;
FILEDEF THISTIME DISK THISTIME (APPEND
-RUN
-SET &TIMES = &APPS - 1;
-REPEAT ENDPROC &TIMES TIMES;
-SET &X=&X + 1;
APP QUERY &APPNAME.&X HOLD
TABLE FILE FOCAPPQ
PRINT FOCEXEC
BY APPNAME AS 'FOLDERNAME'
WHERE FILENAME LIKE '%.fex'
ON TABLE HOLD AS THISTIME
END
-RUN

-ENDPROC
JOIN SMRPCKEY IN IBI_SMRPCS TO SESSKEY IN IBI_SMSESSIONS AS J1

DEFINE FILE IBI_SMRPCS
FOCEXEC1/A66=GETTOK(SMFEXNAME, 66,-1, '/', 66, 'A66');
FOCEXEC/A66=GETTOK(FOCEXEC1, 66, 1, '.', 66, 'A66');
END


MATCH FILE THISTIME
SUM FOLDERNAME
BY FOCEXEC
RUN
FILE IBI_SMRPCS
SUM CNT.SMRPCKEY AS 'RUNS'
    MAX.SMRPCDATE AS 'LATEST'
BY FOCEXEC
BY SMUSERID
WHERE SMRPCDATE FROM '&STARTDATE' TO '&ENDDATE'
AFTER MATCH HOLD AS ALLFEX OLD
END
-RUN

DEFINE FILE ALLFEX
ALLOFIT/A1=' ';
RECORDS/I6=IF RUNS GT 0 THEN 1 ELSE 0;
RUN_FLAG/I6=IF RUNS GT 0 AND FOCEXEC NE LAST FOCEXEC THEN 1 ELSE 0;
FEX_FLAG/I6=IF FOCEXEC EQ LAST FOCEXEC THEN 0 ELSE 1;
END


TABLE FILE ALLFEX
-IF &OUTPUT EQ 'EXL2K' GOTO EXLBIT;
SUM
FEX_FLAG AS 'Total Procedures'
RUN_FLAG    AS 'Number Used'
COMPUTE PCT_USED/D8.2%=RUN_FLAG/FEX_FLAG *100; AS 'Percent,Used'
BY ALLOFIT AS 'Grand Total'

SUM FEX_FLAG AS 'Subtotal Procedures'
    RUN_FLAG    AS 'Number Used'

COMPUTE PCT_USED2/D8.2%=RUN_FLAG/FEX_FLAG *100; AS 'Percent,Used'
BY ALLOFIT  AS 'Grand Total'
BY FOLDERNAME AS 'Application Folder'

SUM RUNS      AS 'Times Run'
    RECORDS  AS 'Number of Users'
 MAX.LATEST  AS 'Last Run'
BY ALLOFIT  AS 'Grand Total'
BY FOLDERNAME AS 'Application Folder'
BY FOCEXEC  AS 'Procedure Name'
-EXLBIT
SUM RUNS    AS 'Times Run'
    MAX.LATEST  AS 'Last Run'
BY ALLOFIT  AS 'Grand Total'
BY FOLDERNAME AS 'Application Folder'
BY FOCEXEC    AS 'Procedure Name'
BY SMUSERID   AS 'User ID'
HEADING CENTER
"WebFOCUS Statistics"
"From &STARTDATE to &ENDDATE"
"Environment: &WF_ENV"
"Procedures (Focexecs) "
ON TABLE PCHOLD FORMAT &OUTPUT
-IF &OUTPUT EQ 'EXL2K' GOTO EXLSET;
ON TABLE SET EXPANDABLE ON
-GOTO ENDOUT
-EXLSET
ON TABLE SET BYDISPLAY ON
-ENDOUT
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, SIZE=9,$
TYPE=TITLE, BACKCOLOR=LIGHT GREY,$
TYPE=HEADING, STYLE=BOLD,SIZE=10, BACKCOLOR=LIGHT BLUE,$
TYPE=FOOTING, SIZE=8, BACKCOLOR=LIGHT BLUE,$
ENDSTYLE
END

 



(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
July 10, 2012, 05:46 PM
Prarie
Thanks! I'll get it a try.
July 11, 2012, 09:34 AM
KenFR
I have this in a fex and INCLUDE it at the top of my reports:
FILEDEF TRACKER DISK /WebFOCUS/ibi/apps/yourfolder/tracker.ftm (APPEND
-RUN
-*
-SET &APPL = 'yourfolder';
-SET &CMA = ',' ;
-SET &PRGM = &FOCINCLUDE ;
-SET &DATE = &YYMD ;
-SET &TIME = &TOD ;
-SET &IPADR = 'Report Caster ';
-SET &CHTM = ' ' ;
-SET &CFOC = ' ';
-SET &TUSER = &FOCUSER;
-*
-WRITE TRACKER &APPL &CMA &PRGM &CMA &DATE &CMA &TIME &CMA &IPADR &CMA &CHTM &CMA &CFOC &CMA &TUSER
-RUN


8105 Tomcat and AIX reporting server
input: Teradata, SQL, DB2, Essbase, Oracle, text
output:html, excel, PDF,