Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

Is there a way to see which of the reports in a folder have been run in the last 3 months? means how many times a reports have been executed over the past 3 months. This is very urgent , can someone please help me on this?


Merin Joseph
Go to solution Solved by Martin Yergeau,

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
  • Solution

It probably could have several ways but the one that I use is as below.

Be aware that I can use SQL table and manage them as I want (create/read/update/delete), which is not possible in all organization

1- Create a table having the information that you want to keep

2- Create a master on that table

e.g.

FILENAME=BI_RPT_EXEC, SUFFIX=SQLMSS , $ SEGMENT=BI_RPT_EXEC, SEGTYPE=S0, $ FIELDNAME=FEX_RUN_DATETIME, ALIAS=FEX_RUN_DATETIME, USAGE=HYYMDs, ACTUAL=HYYMDs, $ FIELDNAME=FEX_RUN_DATE, ALIAS=FEX_RUN_DATE, USAGE=YYMD, ACTUAL=DATE, $ FIELDNAME=FEX_RUN_TIME, ALIAS=FEX_RUN_TIME, USAGE=A8V, ACTUAL=A8V, $ FIELDNAME=FEX_DOMAIN, ALIAS=FEX_DOMAIN, USAGE=A50V, ACTUAL=A50V, $ FIELDNAME=FEX_NAME, ALIAS=FEX_NAME, USAGE=A100V, ACTUAL=A100V, $ FIELDNAME=FEX_USER, ALIAS=FEX_USER, USAGE=A50V, ACTUAL=A50V, $ FIELDNAME=FEX_VERSION, ALIAS=FEX_VERSION, USAGE=P7.2, ACTUAL=P3, $

3- Create a generic fex that will insert the "trace". Located in EDASERVE

e.g.

-* File: IBFS:/EDA/EDASERVE/APPPATH/shared_modules/add_rpt_exec_trace.fex-*-* This is to create an entry in SQL table BI_RPT_EXEC when a report is launched.-*-* Parameters: Selection Condition: Test Condition:-* - Fex Domain - mandatory-* - Fex Name - mandatory-* - Fex Version - mandatory-* - User ID - mandatory-*-* REPORT VERSION-SET &RUNDATE = EDIT(&YYMD,'9999-99-99');-SET &RUNTIME = EDIT(&TOD,'99$:99$:99');-DEFAULTH &FEXNAME = 'ADD_RPT_EXEC_TRACE'-DEFAULTH &FEXDOM = 'SHARED_MODULES'-DEFAULTH &VERSION = '1.00'-DEFAULTH &IBIMR_user = 'admin'-DEFAULTH &FEX_RUN_DATETIME = ''-DEFAULTH &FEX_RUN_DATE = &RUNDATE-DEFAULTH &FEX_RUN_TIME = &RUNTIME-DEFAULTH &FEX_DOMAIN = ''-DEFAULTH &FEX_NAME = ''-DEFAULTH &FEX_VERSION = &VERSION-DEFAULTH &FEX_USER = '' -IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO NOTRACE;-IF &IBIMR_user EQ 'wt1' THEN GOTO NOTRACE;-IF &IBIMR_user CONTAINS 'admin' THEN GOTO NOTRACE; DEFINE FILE CARFEX_RUN_DATETIME /HYYMDs = HGETC(10, FEX_RUN_DATETIME);FEX_RUN_DATE /YYMD = '&RUNDATE.EVAL';FEX_RUN_TIME /A8 = '&RUNTIME.EVAL';FEX_DOMAIN /A50V = UPCASE(50, '&FEXDOM.EVAL', FEX_DOMAIN);FEX_NAME /A100V = UPCASE(100, '&FEXNAME.EVAL', FEX_NAME);FEX_USER /A50V = LOCASE(50, '&IBIMR_user.EVAL', FEX_USER);FEX_VERSION /D5.2 = &VERSION;ENDTABLE FILE CARSUM CAR NOPRINTBY FEX_RUN_DATETIMEBY FEX_RUN_DATEBY FEX_RUN_TIMEBY FEX_DOMAINBY FEX_NAMEBY FEX_VERSIONBY FEX_USERWHERE READLIMIT EQ 1;WHERE RECORDLIMIT EQ 1;ON TABLE HOLD AS WRK FORMAT BINARYEND-RUN-READFILE WRK-RUN -SET &FEX_DOMAIN = TRUNCATE(&FEX_DOMAIN);-SET &FEX_NAME = TRUNCATE(&FEX_NAME);-SET &FEX_USER = TRUNCATE(&FEX_USER); ENGINE SQLMSS SET DEFAULT_CONNECTION Con_WFWorkSQL SQLMSSINSERT INTO [dbo].[bI_RPT_EXEC] ( [FEX_RUN_DATETIME], [FEX_RUN_DATE], [FEX_RUN_TIME], [FEX_DOMAIN], [FEX_NAME], [FEX_VERSION], [FEX_USER]) VALUES ('&FEX_RUN_DATETIME', CAST('&FEX_RUN_DATE' AS DATE), '&FEX_RUN_TIME', '&FEX_DOMAIN', '&FEX_NAME', '&FEX_VERSION', '&FEX_USER');SQL COMMIT;END-RUN-NOTRACE-* ---------------------------------------------------* End add_rpt_exec_trace-* --------------------------------------------------

4- Call above fex in those from where you want to keep a trace providing proper parameters

-IF &COMMPGM_CALL IN ('Y', 'P') THEN GOTO SKIPTHISTRACE;-* REPORT VERSION-SET &VERSION = '3.06';-SET &RUNDATE = EDIT(&YYMD,'9999-99-99');-SET &RUNTIME = EDIT(&TOD,'99$:99');-SET &FEXDOM = 'SALES';-SET &FEXNAME = 'CUSTOMER INVOICING'; -MRNOEDIT -INCLUDE shared_modules/add_rpt_exec_trace.fex-SKIPTHISTRACE

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...