[SOLVED] Whats the easiest way to lookup a field in a master file across all folders?
I want to be able to look up a field in a master file across all procedure in all folders to see where its being used? I used to be able do a grep in UNIX but now we are on Windows 2008 server. Can some one please help or point me in the right direction?
Thanks, prodriguThis message has been edited. Last edited by: Kerry,
1. Pure focus. USE APP LIST to get a list of APP directories, then process each with APP PATH and TABLE FILE SYSCOLUM.
1. Windows command FIND. USE APP LIST to get a list of APP directories, then process each with FIND "text" {directory}.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
October 29, 2012, 07:17 PM
prodrigu
Waz,
I know this might sound like a stupid question but can you show an example of what you mean when you say process each with APP PATH and TABLE FILE SYSCOLUM?
APP LIST HOLD
-RUN
TABLE FILE FOCAPPL
PRINT APPNAME
ON TABLE SAVE AS TMP_APP
END
-RUN
-SET &APP_Count = &LINES ;
-REPEAT APP_LOOP &APP_Count TIMES
-READ TMP_APP NOCLOSE &APP_Name.A64.
APP PATH &APP_Name
-RUN
TABLE FILE SYSCOLUM
PRINT COMPUTE APP_DIR/A64 = '&APP_Name' ;
TBNAME
NAME
WHERE NAME EQ 'CAR'
END
-APP_LOOP
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
October 30, 2012, 09:22 AM
Clif
From the Data Management Console or Web Console open the synonym containing the field. Right click on the field and select Impact Analysis.
You will get a report that shows each procedure (and DataMigrator flow) that uses the field and how it is used.
N/A
October 30, 2012, 01:52 PM
nd
I have been relying on Impact Analysis--both from the app and (as we use MR) from Domains.
We're also running on a Windows server, so I'll also use the built-in command FINDSTR. It offers a few more options.
You need to be on the server or have a drive mapped--the command doesn't like UNCs.
I -- case insensitive S -- search current directory and subdirectories M -- show just the file names, not the names and the line preview C:"string" -- uses a literal. otherwise, it would search for occurences of file and of car
+1 on FINDSTR. Works just like grep. Supports RegEx. I like the line of Context by not using the /M switch.
Also, TextPad has an awesome 'Find In Files' search that is RegEx aware, searches subdirectories and when you click on the file name in the search results, it loads it into the main pane.