Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Text file data source

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Text file data source
 Login/Join
 
Member
posted
I have been asked to create a WebFOCUS report against an application log file. I doubt that this is possible.

I think I would need to set up a process to create and update a table using the contents of the log file. Then configure a synonym for the new table, etc.

Any comments or suggestions about the feasibility of this approach will be appreciated.

Thanks

This message has been edited. Last edited by: <Emily McAllister>,


7.703 Windows
8.009
 
Posts: 11 | Registered: October 09, 2015Report This Post
Virtuoso
posted Hide Post
Do you know what the application log file looks like? If you can identify each column in the log file, you can create a synonym (master file) for it and report off of it. Unfortunately, most log files aren't really well structured so that's what makes the process a lot more labor intensive.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
The simplest way to read a log file is to use a master file that has a single field in it to read each row, then you can break it up with DEFINES, etc.

If it is structured, then a more complex master can be created.

e.g.
EX -LINES * EDAPUT MASTER,LOG,CV,FILE
FILENAME=LOG, SUFFIX=FIX,$
SEGNAME=LOG, $
  FIELD=LINE ,ALIAS=  ,A255 ,A255 ,$
EDAPUT*

EX -LINES * EDAPUT FOCTEMP,LOG,CV,FILE
The Quick Brown Focus Jumped Over The Lazy SQL
EDAPUT*

FILEDEF LOG DISK log.ftm

-RUN

TABLE FILE LOG
PRINT *
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Thanks BabakNYC and Waz,

I used Waz's guidelines.

I created a synonym using the text editor

Synonym Name: LogTest

FILENAME=ErrorLogTest, SUFFIX=FIX,$
SEGNAME=ErrorLogTest, $
FIELD=LINE ,ALIAS= ,A255 ,A255 ,$

I placed the ErrorLogTest log file in the baseapp folder as ErrorLogTest.ftm

I created a procedure:

FILEDEF LogTest DISK baseapp/ErrorLogTest.ftm
-RUN
TABLE FILE LogTest
PRINT *
END

I can run the procedure and it shows every line in the ErrorLogTest.ftm file. So now I need to find a way to filter ErrorLogTest.ftm so that when my procedure runs it only shows the errors that I am looking for.


7.703 Windows
8.009
 
Posts: 11 | Registered: October 09, 2015Report This Post
Guru
posted Hide Post
If you can load the file into either a CSV or Excel file, you can then add it to WF as a synonym using the new / upload feature In the Master File folder.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Virtuoso
posted Hide Post
I haven't tested it in an FTM but you could try setting a FILTER in the master file that tests if LINE has the word error in it.
FILTER ERR_TEST=LINE CONTAINS 'Error'; $

then have a WHERE ERR_TEST EQ 1;

in your focexec.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
That worked perfectly Babak. Thanks for that.

I will look into the Master File upload feature, had not heard of that before.

Thanks, problem solved.


7.703 Windows
8.009
 
Posts: 11 | Registered: October 09, 2015Report This Post
Guru
posted Hide Post
Take a look in Creating Reporting Applications With Developer Studio > Creating a Reporting Application > Uploading Data Files


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Member
posted Hide Post
Babak,
How do you add multiple conditions to that FILTER statement? Can you use AND, OR?


7.703 Windows
8.009
 
Posts: 11 | Registered: October 09, 2015Report This Post
Virtuoso
posted Hide Post
Looks like you can. I just tried this filter in car file and got what I expected.

FILTER TEST=COUNTRY CONTAINS 'ENG' OR COUNTRY NE 'FRANCE'; $


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Member
posted Hide Post
Thanks,

I found that this works in the FEX to do multiple conditions on the filter

WHERE ERR_TEST EQ 1;
WHERE LINE CONTAINS '10/29/2015';

What I need to do now is find out how to replace 10/29/2015 with today's date and time.


7.703 Windows
8.009
 
Posts: 11 | Registered: October 09, 2015Report This Post
Platinum Member
posted Hide Post
I would think you'd just setup a define like such:

DT_TODAY/MDYY='&DATEMDYY';

Then within your WHERE clause replace '10/29/2015' with DT_TODAY.

-Joe


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
 
Posts: 146 | Registered: November 09, 2015Report This Post
Virtuoso
posted Hide Post
quote:
WHERE LINE CONTAINS '10/29/2015';


Take a look at &DATEDMYY.

WHERE LINE CONTAINS '&DATEDMYY';


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Really wanted to click a LIKE button then


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]Text file data source

Copyright © 1996-2020 Information Builders