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     [SOLVED] Searching Fex's in web Focus 8
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Searching Fex's in web Focus 8
 Login/Join
 
Master
posted Hide Post
This works with SQL Server (ReportCaster.BOTLDATA.REPORT):

Since the payload 'decompiles' to PDF which is gibberish when viewed as plain text, perhaps someone can test this on a blob field with plain text contents? Even better, test against WF8 fex contents?

SELECT convert(varchar(max), cast(REPORT as binary)) 
FROM BOTLDATA
WHERE report_id ='some_report_id'


thread I borrowed this from, here: http://stackoverflow.com/quest...to-string-sql-server


MySQL version (tested on an SAP CMS database in MySQL with a text based blob field):

select LastModifyTime, CONVERT(LastModifyTime USING utf8) 
FROM boe120.CMS_InfoObjects6
where objectid = '98016'


http://stackoverflow.com/quest...lob-to-text-in-mysql

- ABT

This message has been edited. Last edited by: ABT,
 
Posts: 561 | Registered: February 03, 2010Report This Post
Virtuoso
posted Hide Post
Just to clarify, the creature ate Sheboygan.

J.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Platinum Member
posted Hide Post
This is news to me. Like many have commented, I am constantly using tools to search through fexes in order to find certain parts of code... and also to batch replace strings (I use astrogrep and notepad++ btw). And winmerge for comparisons. This will certainly be more complicated once everything is stored in blobs in the db....


WF 8.0.0.5M
 
Posts: 246 | Location: Montreal, QC, Canada | Registered: October 01, 2003Report This Post
Platinum Member
posted Hide Post
Hi running

I tested the select statement, provided by ABT in webfocus 8. It returns the fex that is stored in the BLOB. And it is in a readable format.


Crystal


Webfocus 8.0.7 on Windows
 
Posts: 176 | Location: Ohio | Registered: October 26, 2006Report This Post
Master
posted Hide Post
quote:
Originally posted by CLH:
Hi running

I tested the select statement, provided by ABT in webfocus 8. It returns the fex that is stored in the BLOB. And it is in a readable format.

Crystal


Thanks for the confirmation, this is good news. Would you mind creating a simple 'TABLE FILE CAR' program and then decoding the text via that query and posting the full result set (via a SELECT * from the database)?

Your test tells me that the data *can* be gotten to, but with some pain (the decode function is very slow (at least in my ReportLibrary PDF test)). ReportCaster ZULU TIME, anyone?

I'm assuming that the FEX text either shows as one big long string (with or without embedded carriage return/new lines) or as a block with line breaks. If so, I'm wondering if an ETL function could be written that could then reinsert the individual lines to another table for easier searching?

Something like this:

MREDOMAIN   FEXNAME   FEXTITLE   CREATE_NAME         CREATE_DATE       MODIFY_DATE       LINE   PROGRAM TEXT
mydomain    car.fex   Car Test   Joe Blow (a12345)   20130206 080000   20130206 080000   1      TABLE FILE CAR
mydomain    car.fex   Car Test   Joe Blow (a12345)   20130206 080000   20130206 080000   2      PRINT
mydomain    car.fex   Car Test   Joe Blow (a12345)   20130206 080000   20130206 080000   3      *
mydomain    car.fex   Car Test   Joe Blow (a12345)   20130206 080000   20130206 080000   4      WHERE COUNTRY EQ 'JAPAN';
mydomain    car.fex   Car Test   Joe Blow (a12345)   20130206 080000   20130206 080000   5      END


Or it could be normalized, but you get the idea.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Expert
posted Hide Post
And I'd like to know if you can use a SELECT statement determine all the fex names that match a search criteria that searches the text of the fex.

Thanks very much.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
It's interesting that all us 7.7'ers can do is speculate and beg the 8.0'ers for information - the 8.0 docs are under lock and key...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
quote:
Originally posted by Francis Mariani:
And I'd like to know if you can use a SELECT statement determine all the fex names that match a search criteria that searches the text of the fex.

Thanks very much.


That's what I was getting to with the load, an easy way to query the contents. As it stands, per CLH's assertion, you could do the following:

MySQL Dialect using Business Objects CMS database:
Select * 
from (
   select LastModifyTime, CONVERT(LastModifyTime USING utf8) as charLastModifyTime
   FROM boe120.CMS_InfoObjects6
   where objectid = '98016'
   limit 2
) as modifyTime
where charLastModifyTime like '%2012 01 19%'


Results:
LastModifyTime    charLastModifyTime
[BLOB]            2012 01 19 04 40 44 329


I'm thinking that the fex data store could be queried similarly. Decoding on the fly would be slow and provide fewer capabilities. UNIONS or another subselect could then be used to query for a second term.

Off-Topic: Something I've never liked about this or other text based methodologies is the loss of context. Just because a word is found doesn't mean it is used in the way that I want. Like a comment or local variable/hold file name that may match a watch word. That is one thing I like about Impact Analysis. It just can't be used to manage effectively.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Gold member
posted Hide Post
I created this query to grab fex code from content folders:

  
USE WebFocus

SELECT CR.OBJ_HANDLE AS 'Fex Name'
      ,CR.[CREATEDBY] as 'Created By'
      ,CR.[CREATEDON] as 'Created On'
	  ,CAST(cast(cast(CR.BCONTENT as varbinary(max)) as varchar(max)) AS nTEXT) AS 'Fex Code',
	  RO.PRT_PATH AS 'Content Path'	
FROM [WebFocus].[dbo].[WF_CONTENT_REVS] CR
JOIN WebFocus.dbo.WF_REPOSOBJ RO ON RO.HANDLE = CR.OBJ_HANDLE




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


 
Posts: 94 | Location: Austin, TX | Registered: August 08, 2012Report This Post
Platinum Member
posted Hide Post
Joey - this is wonderful - I've been looking for something like this to find out which *.fex may have a variable or table for quite some time.

I made very minor tweak to order - and added fileName to the output. I think the only thing I'd really like to see added, if possible, is "private". I poked around the database - and I wasn't able to figure out how to tell if a particular object was private.

SELECT CR.OBJ_HANDLE AS 'Fex ID'
		,RO.PRT_PATH AS 'Content Path'	
		,RO.OBJNAME as fileName
		,RO.OBJTYPE as 'Object Type'
		,CR.[CREATEDBY] as 'Created By'
		,CR.[CREATEDON] as 'Created On'
		,RO.[LASTMODON] as 'Last Modified On'
		,CAST(cast(cast(CR.BCONTENT as varbinary(max)) as varchar(max)) AS nTEXT) AS 'Fex Code'	  
FROM [WF_CONTENT_REVS] CR
JOIN WF_REPOSOBJ RO ON RO.HANDLE = CR.OBJ_HANDLE
where CAST(cast(cast(CR.BCONTENT as varbinary(max)) as varchar(max)) AS nTEXT)  like '%H2O_SINGLE_ITM_DDL%'
--where RO.PRT_PATH like '%H2OSales/Products%'
--where objname like '%logo%'
order by RO.[LASTMODON] 


webFOCUS 8207.15
WindowsServer 2019
 
Posts: 120 | Location: Minnesota | Registered: August 26, 2013Report This Post
Guru
posted Hide Post
I am trying this using db2 files. I keep getting BCONTENT displayed in hexadecimal. What is a good value to replace nTEXT with?


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Platinum Member
posted Hide Post
Hi,

Depending on what version you have of 8.0 you can set IB_CM_FORMAT_RAW to true in the administration console.

Then create an export of your code. It will read it from the repository and store it in readable format on your drive. You can then use that code for searches etc.

Now if there was a way to schedule this then you could always have a current copy of the code to search or use for restores.

Crystal


Webfocus 8.0.7 on Windows
 
Posts: 176 | Location: Ohio | Registered: October 26, 2006Report This Post
Guru
posted Hide Post
Thanks!

I will look into that.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Searching Fex's in web Focus 8

Copyright © 1996-2020 Information Builders