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 search a domain for a masterfile name I a...


robert fuschetto

Recommended Posts

Hello Robert,

since this seems like a very infrequent request, the easiest practical way to accomplish this is the following:

 

Create a WebFOCUS Change Management Export package for the domains / workspaces in question, and run the export

This will create a folder structure /WebFOCUS82cm/export/{yourpackagename} and subfolders

Navigate to subfolder root_contentWFCRepository

 

All files will be available as text files, including procedures and HTML files created in AppStudio

Use a tool like wingrep or similar tools to search for the name of the master file, e.g. search for CAR

You will find the files that have a reference to the master file name, and can then assess whether these references still warrant to keep your master file

 

If you have any questions, please let me know.

Link to comment
Share on other sites

If you repository is in a SQL DB, you can perform as below

It will list all object that have a reference to the LIKE clause

SELECT

T2.PRT_PATH AS 'Location',

T2.OBJNAME AS 'Object Name',

'IBFS:' + T2.PRT_PATH + '/' + T2.OBJNAME AS 'Full IBFS path'

--,T1.OBJ_HANDLE

--,CAST(CAST(T1.BCONTENT AS VARBINARY(MAX)) AS VARCHAR(MAX)) 'Code'

FROM dbo.WF_CONTENT_REVS T1

INNER JOIN dbo.WF_REPOSOBJ T2

ON T1.OBJ_HANDLE = T2.HANDLE

WHERE UPPER(CAST(CAST(T1.BCONTENT AS VARBINARY(MAX)) AS VARCHAR(MAX))) LIKE '%DTADD%'

ORDER BY 1, 2, 3

Link to comment
Share on other sites

-*-*-* Find All Masters used in a File or a Folder.

 

---* Assumes Connection String to Repository is WF_Repository

---* Assumes Fex files are limited in their volume of text in the code, feel free to expand or contract as you need.

---* Written for MS-SQL Based setup. YMMV.

---- Text Search. Doesnt expand for include files

TABLE FILE SYSFILES

PRINT

FILENAME AS FNAME1

BY LGNAME

ON TABLE SET ASNAMES ON

ON TABLE HOLD AS MASTERS

END

---* This setting allows us to set the search to case-insensitive!!!

SET COLLATION=SRV_CI

-RUN

---* This setting allows us to set the search to case-insensitive!!!

SET HOLDLIST = PRINTONLY

SET BYDISPLAY = ON

SET PAGE-NUM = NOLEAD

SET HTMLCSS = ON

SET LINES = 990

-RUN

-DEFAULT &WFFMT = AHTML;

-DEFAULT &MYPATH = /WFC/Repository/;

-DEFAULT &MYRPT = SomeFex.fex;

-SET &MYFORMAT=&WFFMT.(AHTML, HTML, XLSX, COMT).Output Format.;

-RUN

-SET &MYCRIT1=IF &SEARCHTYPE.(Folder,File).Search Type. EQ Folder THEN WHERE CHARINDEX( ELSE WHERE T2.OBJNAME = ;

-SET &MYCRIT2=IF &SEARCHTYPE EQ Folder THEN REPLACE(&MYPATH.QUOTEDSTRING,IBFS:,) ELSE &MYRPT.QUOTEDSTRING;

-SET &MYCRIT3=IF &SEARCHTYPE EQ Folder THEN ,T2.PRT_PATH ) > 0 ELSE ;

ENGINE SQLMSS SET DEFAULT_CONNECTION WF_Repository

SQL SQLMSS PREPARE SQLOUT FOR

SELECT

CHARINDEX(&MYPATH,T2.PRT_PATH ) AS CI,

MASTER AS LGNAME,

T2.PRT_PATH

, T2.OBJNAME

, T2.OBJTYPE

, T2.CLASSNAME

, T2.CREATEDBY

, T2.CREATEDON

, T2.LASTMODBY

, T2.LASTMODON

, T4.OBJDESC

,CAST(CAST(SUBSTRING(T1.BCONTENT,1,7000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB1

,CAST(CAST(SUBSTRING(T1.BCONTENT,7001,14000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB2

,CAST(CAST(SUBSTRING(T1.BCONTENT,14001,21000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB3

,CAST(CAST(SUBSTRING(T1.BCONTENT,21001,28000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB4

,CAST(CAST(SUBSTRING(T1.BCONTENT,28001,35000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB5

,CAST(CAST(SUBSTRING(T1.BCONTENT,35001,42000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB6

,CAST(CAST(SUBSTRING(T1.BCONTENT,42001,49000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB7

,CAST(CAST(SUBSTRING(T1.BCONTENT,49001,56000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB8

,CAST(CAST(SUBSTRING(T1.BCONTENT,56001,63000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB9

,CAST(CAST(SUBSTRING(T1.BCONTENT,63001,70000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB10

,CAST(CAST(SUBSTRING(T1.BCONTENT,70001,77000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB11

,CAST(CAST(SUBSTRING(T1.BCONTENT,77001,84000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB12

,CAST(CAST(SUBSTRING(T1.BCONTENT,84001,91000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB13

,CAST(CAST(SUBSTRING(T1.BCONTENT,91001,98000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB14

,CAST(CAST(SUBSTRING(T1.BCONTENT,98001,105000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB15

,CAST(CAST(SUBSTRING(T1.BCONTENT,105001,112000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB16

,CAST(CAST(SUBSTRING(T1.BCONTENT,112001,112000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB17

,CAST(CAST(SUBSTRING(T1.BCONTENT,119001,126000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB18

,CAST(CAST(SUBSTRING(T1.BCONTENT,126001,133000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB19

,CAST(CAST(SUBSTRING(T1.BCONTENT,133001,140000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB20

,CAST(CAST(SUBSTRING(T1.BCONTENT,140001,147000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB21

,CAST(CAST(SUBSTRING(T1.BCONTENT,147001,154000) AS BINARY(7000)) AS CHAR(7000)) AS MYBLOB22

FROM

WebFocusRepository_DEV.dbo.WF_CONTENT_REVS T1

INNER JOIN WebFocusRepository_DEV.dbo.WF_REPOSOBJ T2 ON T1.OBJ_HANDLE = T2.HANDLE

INNER JOIN WebFocusRepository_DEV.dbo.WF_NLSOBJ T4 ON T2.HANDLE = T4.OBJ_HANDLE AND T2.DEF_LNG = T4.WF_LNG

&MYCRIT1 &MYCRIT2.QUOTEDSTRING &MYCRIT3

;

END

-RUN

JOIN LGNAME IN SQLOUT

TO MULTIPLE

LGNAME IN MASTERS

TAG TOMAS AS TOMAS

END

DEFINE FILE SQLOUT

CHECKNAME/A250V=TRIM_(BOTH, ',FNAME1);

CHUNKY/TX200 = MYBLOB1||MYBLOB2||MYBLOB3||MYBLOB4;

MASFOUND/I8=POSITION(CHECKNAME,CHUNKY)

END

TABLE FILE SQLOUT

PRINT

CI

FNAME1 AS Master

MASFOUND AS Position

BY PRT_PATH AS Path

BY OBJNAME AS File

WHERE MASFOUND GT 0;

ON TABLE PCHOLD FORMAT &WFFMT

ON TABLE SET AUTOFIT OFF

ON TABLE SET AREXPEXCEL XLSX

ON TABLE SET STYLE *

ENDSTYLE

END

-THEEND

Link to comment
Share on other sites

Or try this

-SET &COMPNAME = FGETENV(12,COMPUTERNAME,12,A12);

-TYPE &COMPNAME

-RUN

APP LIST HOLD

TABLE FILE FOCAPPL

PRINT APPNAME

ON TABLE SAVE

END

-RUN

-SET &APPLINE = ';

-REPEAT :LAB1 &LINES TIMES

-READ SAVE &APP.64

-SET &APPLINE = &APPLINE | | &APP ;

-:LAB1

APP QUERY &APPLINE HOLD

TABLE FILE FOCAPPQ

HEADING

"WebFocus Application <APPNAME "

on server &COMPNAME

" "

FOOTING

All files are shown lower case regardless of actual filename case.

PRINT FILENAME

BY APPNAME PAGE-BREAK

IF FILENAME CONTAINS .mas

ON TABLE SET STYLE *

TYPE=HEADING, LINE=1, SIZE=12, STYLE=BOLD, JUSTIFY=CENTER,$

TYPE=HEADING, LINE=1, OBJECT=FIELD, COLOR=RED, STYLE=BOLD+UNDERLINE,$

TYPE=HEADING, LINE=2, SIZE=11, STYLE=BOLD, JUSTIFY=CENTER,$

TYPE=TITLE, SIZE=10, STYLE=BOLD, COLOR=RED,$

ENDSTYLE

END

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...