Focal Point
[SHARING] Reports on EDAPRINT

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

August 25, 2009, 12:49 PM
Pascal Bellerose
[SHARING] Reports on EDAPRINT
Hi,

I'd like to know if any of you created some reports on EDAPRINT.log to get statistics over time like number of agents active at the same time?

If so, I'd like to see some code because I am new to this and I'd like to know how it should be done.

Thanks.

This message has been edited. Last edited by: Pascal Bellerose,


WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2
August 26, 2009, 03:15 PM
Microfich
You could create a MASTER file that matches the layout of EDAPRINT.log:

  FILENAME=EDAPRINT  , SUFFIX=FIX     , $
  SEGMENT=EDAPRINT, SEGTYPE=S0, $
    FIELDNAME=LOGTIME, ALIAS=LOGTIME, USAGE=A19, ACTUAL=A20, $
    FIELDNAME=FILL1,ALIAS=FILL1, USAGE=A1,ACTUAL=A4,$
    FIELDNAME=LOGDATA, ALIAS=LOGDATA, USAGE=A80, ACTUAL=A80, $
    


Then, FILEDEF the edaprint log file referencing the master you just created and the place it resides.

You can now issue TABLE commands against the log.


WebFOCUS 8105
Windows;
DB2, UDB, SQL Server, Oracle
FOCUS-WebFOCUS since 1981
January 06, 2010, 09:03 AM
Pascal Bellerose
Anyone knows which entries I must filter in order to get start/stop of sessions only?

Would'nt want to reinvent the wheel...


WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2
January 06, 2010, 09:23 AM
GinnyJakes
quote:
01/05/2010 20:43:02 accepting cmrpip027758 tcp=139.51.76.101:61245
01/05/2010 20:43:02 request by cmrpip027758 for explicit connect to agent (DEFAULT)
01/05/2010 20:43:02 connecting cmrpip027758 tscomid=306,sesid=27477
01/05/2010 20:43:02 processing cmrpip027758 u=udwfadmn,g=webfocus,l=USR
01/05/2010 20:43:02 request by t3rp835616 to notify disconnect of sesid=27477
01/05/2010 20:43:02 disconnect cmrpip027758 tscomid=306,sesid=27477

Here is a series from edaprint.log that shows the life of a session. You should be able to tell from this pattern what you need to extract to determine start/stop. I would suggest the 'connecting' and the 'disconnect' lines. Please bear in mind that there may be intervening lines for other sessions so you'll probably have to hold the sorted output before doing any kind of meaningful report.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 06, 2010, 04:24 PM
Pascal Bellerose
Ok, I'm having problems with my report.

I created a Master as Microfich suggested:
 FILENAME=EDAPRINT, SUFFIX=FIX, DATASET='/ibi_crp/ibi/srv769/wfs/edaprint.log', $
   SEGMENT=EDAPRINT, SEGTYPE=S0, $
     FIELDNAME=LOGTIME, ALIAS=LOGTIME, USAGE=A19, ACTUAL=A20, $
     FIELDNAME=LOGDATA, ALIAS=LOGDATA, USAGE=A80, ACTUAL=A80, $


And then I created a simple report to see how it looks:
TABLE FILE EDAPRINT
PRINT *
END
-RUN


Here's what I get when I run this report:
 (FOC1049) ERROR IN READING NEXT RECORD  : EDAPRINT
 0 NUMBER OF RECORDS IN TABLE=        0  LINES=      0



WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2
January 06, 2010, 04:27 PM
GinnyJakes
And the problem is...?

And your master doesn't match his.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 06, 2010, 04:39 PM
GinnyJakes
On my system, not all rows are 100 bytes long. Let me play with it awhile and get back to you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 06, 2010, 04:48 PM
Pascal Bellerose
I defined the edaprint file in the master file instead of the fex... probably not the best way to do this but it's the only way I could get the synonym to produce some data when doing a sample data...

And when I try to define the file in a fex, it gets worse... It refuses to parse FILEDEF... But I'm just starting on this and got not much training.


WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2
January 06, 2010, 05:29 PM
GinnyJakes
I'm working on trying to homogenize the file but won't get it done today. More tomorrow.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
January 07, 2010, 04:39 AM
<JG>
FILEDEF MAS DISK EDAPRINT.MAS
FILEDEF EDAPRINT DISK C:\ibi\DevStudio76\srv76\wfs\EDAPRINT.LOG
-RUN
-WRITE MAS FILENAME=EDAPRINT , SUFFIX=FIX , $
-WRITE MAS SEGMENT=EDAPRINT, SEGTYPE=S0, $
-WRITE MAS FIELDNAME=LOGTIME, ALIAS=LOGTIME, USAGE=A19, ACTUAL=A20, $
-WRITE MAS FIELDNAME=LOGDATA, ALIAS=LOGDATA, USAGE=A80, ACTUAL=A80, $
DEFINE FILE EDAPRINT
USER /A7= IF LOGDATA CONTAINS 'processing' THEN EDIT(LOGDATA,'$$$$$$$$$$$$$$$$$$$$$$$$$$9999999');
START/A19=IF LOGDATA CONTAINS 'connecting' THEN LOGTIME ELSE '';
ENDTIME/A19=IF LOGDATA CONTAINS 'disconnect' THEN LOGTIME ELSE '';
CRMPIP/A12=EDIT(LOGDATA,'$$$$$$$$$$$999999999999');
END
TABLE FILE EDAPRINT
SUM USER MAX.START MAX.ENDTIME
BY CRMPIP
WHERE LOGDATA EQ 'connecting$*' OR 'disconnect$*' OR 'processing$*'
END
January 07, 2010, 09:31 AM
Pascal Bellerose
Great!!! Thanks JG, I found out I didn't have to put the filepath in quotation marks.

I thought I ruled out this option but obviously, I did not.

Your code helped me with teh cleaning of unecessary text in the log and get to the essential.

I'm working on filtering agents start/stop and IP that is connecting. I will post my results!



Thanks again!


WFS/FFS/DM 7.6.4 / WFS/FFS/DM 7.6.8 / WFS/FFS/DM 7.6.9 / AS400 V5R4M0 / HTML / iSM 5.5sp2