Focal Point
[CLOSED] How do you search for focexecs?

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

September 09, 2011, 11:51 AM
Tiggy0414
[CLOSED] How do you search for focexecs?
We have a project that will be eliminating/replacing some files.

The problem is that we need to identify the FOCEXECs that are using these files as input.

If I sign onto the Windows Reporting Server and use the Search option in Windows to search for these file names in the apps folder, the search comes back with no FOCEXECs found.

Does anyone have any ideas of how to search for /identify these FOCEXECS?

Thanks!

Dawn

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.4 / 7.7.03
Unix and Windows
Excel, PDF
September 09, 2011, 01:24 PM
Saravanan J
Tiggy,

When you say that these files are input to the FOCEXECs, do you mean that Master files are created on top of these files? If so, then the .mas file will contain the name of the file you are searching for.

So first search for all the master files (.mas) files that uses the specified file.
Then right click on the master file and select "Impact Analysis" to find all the FOCEXEC procedures using this.


Release : 7.7.02
OS : Linux
App Server : Tomcat
all output
September 09, 2011, 01:37 PM
Tiggy0414
What tool are you suggesting that I use to search for the master files?


WebFOCUS 7.6.4 / 7.7.03
Unix and Windows
Excel, PDF
September 09, 2011, 02:05 PM
John_Edwards
Agent Ransack is a must-have tool in my opinion. Worth a look.

J.



September 09, 2011, 03:47 PM
<FreSte>
Agent Ransack is indeed a great tool to use for this,
but if you prefer to use WebFOCUS (and of course you do Smiler ), maybe the following is
something you can use.
I once had to create a WebFOCUS report at a customer's site doing something simular.

This example below is now only searching in the baseapp application folder. This can be
made dynamicly with a fex of course.
Searching through all application folders (depending on the number of procedure you have)
can take some time to complete.

-Fred-


-* --- File search.fex

-DEFAULT &APPLIC    = 'baseapp';
-DEFAULT &FN2CHECK  = '''.fex'' OR ''.FEX''';
-DEFAULT &STR2CHECK = 'GGSALES' ;


APP QUERY &APPLIC HOLD
-RUN
TABLE FILE FOCAPPQ
  PRINT
    FILENAME
    WHERE FILENAME CONTAINS &FN2CHECK ;
  ON TABLE HOLD AS APPFILES FORMAT ALPHA
END
-RUN
-SET &NUM_LINES = &LINES;

-* --- Master file for fex's etc
TABLE FILE SYSTABLE
  PRINT
    COMPUTE LINE1/A200 = '';
  BY NAME NOPRINT
  ON TABLE SET HOLDLIST PRINTONLY
  ON TABLE SET XRETRIEVAL OFF
  ON TABLE HOLD AS HLDTEMP FORMAT ALPHA
END
-RUN


FILEDEF HLDTOTAL DISK hldtotal.ftm  (APPEND
-RUN
-REPEAT :LOOP1 FOR &I FROM 1 TO &NUM_LINES ;
-READ APPFILES &FILENAME.A40
FILEDEF HLDTEMP DISK &APPLIC|/&FILENAME
TABLE FILE HLDTEMP
  LIST
    COMPUTE FILENAME/A40 = '&FILENAME';
    LINE1
  ON TABLE HOLD AS HLDTOTAL FORMAT ALPHA
  WHERE TOTAL LINE1 CONTAINS UPCASE(&STR2CHECK.LENGTH, '&STR2CHECK', 'A&STR2CHECK.LENGTH');
END
-:LOOP1


TABLE FILE HLDTOTAL
HEADING
"Application   <+0>: &APPLIC "
"Search string <+0>: &STR2CHECK "
"In file(s)    <+0>: &FN2CHECK "
  PRINT
    LIST   AS ''
    LINE1  AS ''
  BY FILENAME NOPRINT
  ON FILENAME SUBHEAD
  "Filename: <FILENAME "

  ON FILENAME SUBFOOT
  " "
  ON TABLE SET LINES 99999
  ON TABLE SET PAGE NOPAGE
  ON TABLE SET HTMLCSS ON
  ON TABLE SET STYLE *
  TYPE=REPORT ,UNITS=PTS ,SQUEEZE=ON,
     BORDER-TOP    = LIGHT,
     BORDER-BOTTOM = LIGHT,
     BORDER-LEFT   = LIGHT,
     BORDER-RIGHT  = LIGHT,
     BORDER-TOP-COLOR    = RGB(187 199 223),
     BORDER-BOTTOM-COLOR = RGB(187 199 223),
     BORDER-LEFT-COLOR   = RGB(187 199 223),
     BORDER-RIGHT-COLOR  = RGB(187 199 223),
     ORIENTATION = LANDSCAPE,
     FONT = 'VERDANA',
     SIZE =  8,
$
TYPE=TITLE      ,STYLE=BOLD  ,BACKCOLOR=RGB(230 230 230)       ,$
TYPE=DATA       ,TOPGAP=2    ,BOTTOMGAP=2                      ,$
TYPE=DATA       ,BACKCOLOR=(RGB(255 255 255) RGB(250 250 250)) ,$
TYPE=HEADING    ,OBJECT=TEXT, ITEM=1, WIDTH=80, STYLE=BOLD     ,$
TYPE=SUBHEAD    ,SIZE=10, STYLE=BOLD                           ,$

ENDSTYLE
END
-RUN

-IF &LINES EQ 0 THEN GOTO :NO_RECORDS;
-EXIT


-:NO_RECORDS
-HTMLFORM BEGIN
<html>
<body topmargin=30 leftmargin=5 style=" font-family:verdana; font-size:12px;" >
Searchstring was not found ...
-HTMLFORM END

September 09, 2011, 06:01 PM
njsden
This is probably not the answer you're looking for but whenever I need to make my "clean-ups" and need to determine what/where is being used nothing like good old Unix tools.

If you have access to a Unix/Linux box (or even a local installation of cygwin in your own workstation) just grab a copy of "approot" from your reporting server and "basedir" from your WF Client, dump them somewhere where *nix can see them and start playing with "find", "grep", "awk" and the like.

I find Fred's suggestion pretty neat and the best is that it keeps it all within the realm of WebFOCUS. I just can't tell at a first glance how easy/feasible it would be to make it work with MRE.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 10, 2011, 05:07 AM
<FreSte>
.... or the DOS way ....

-DEFAULTH &DIR = 'c:\ibi\apps\baseapp\'
-DEFAULTH &EXT = 'fex'
-DEFAULTH &STR = 'ggsales'

FILEDEF RESULT DISK RESULT.TXT
-RUN
!FINDSTR /i /s /n /C:"&STR.EVAL" &DIR.EVAL\*.&EXT.EVAL> RESULT.TXT
-RUN
-HTMLFORM BEGIN
<pre>
!IBI.FIL.RESULT;
</pre>
-HTMLFORM END


(The &DIR can also contain the MRE-directory)
September 11, 2011, 05:39 PM
Waz
quote:
Impact Analysis


Impact Analysis can be access from the WebFOCUs server console.

You go to Metadata, then right click on the master you want to check out, and select Impact Analysis.

The report returned show the procedure name, the app directory, how its being used, line number, and other info.


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!