Focal Point
[SOLVED] searching files on EDASERVE for SQL pass-thru usage

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

February 24, 2020, 10:29 AM
DWaybright
[SOLVED] searching files on EDASERVE for SQL pass-thru usage
Is there a[n easy] way to get a list of files (fex & html) that reside on the EDASERVE that use SQL pass-thru?
I tried logging into the server and just doing a Windows search, but all I get are html files, none of the fex files, and I know there are a bunch.

Thanks,
Deb

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


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
February 24, 2020, 10:32 AM
FP Mod Chuck
Deb

There is a free download called Windows GREP that will allow you to search for strings of data at a directory level. I think you can do the same with Notepad ++ as well


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
February 24, 2020, 10:51 AM
DWaybright
Windows GREP is still around? I haven't used that in ages! Smiler I'll look for it.
Thanks!


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
February 24, 2020, 01:39 PM
Waz
Windows GREP is part of GNU Utilities


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!

February 25, 2020, 08:01 AM
dbeagan
If you are in a hurry or are not allowed to install grep, Windows has the findstr command. For example:
findstr /i /n /s "sqlmss" c:\ibi\apps\*.fex 

Learn about all the options with:
findstr /? 

This looks like a good resource for findstr undocumented features

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


WebFOCUS 8.2.06
February 26, 2020, 11:07 AM
DWaybright
dbeagan - That's what I ended up using. Thanks for posting!


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
February 26, 2020, 12:23 PM
FP Mod Chuck
Good One


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 17, 2020, 02:18 PM
vaayu
This is great and I can see this working on CMD console, but how did you end up using via Table FILE as a report?
Thanks!


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
June 18, 2020, 10:36 AM
dbeagan
I did something like this:
-DEFAULT &File  = '*';
-DEFAULT &Ext   = 'fex';
-DEFAULT &Find  = 'while';
-DEFAULT &Case  = 'ignore';
-SET     &Mesg  = IF &Find EQ 'FOC_NONE' THEN ' '  ELSE 'Found: ' | &Find;
-SET     &Icase = IF &Case EQ 'ignore'   THEN '/i' ELSE ' ';
-SET     &dlm   = CHAR(255);
 
!findstr &Icase/n/s /c:"&Find" c:\ibi\apps\&File..&Ext > list.txt
 
 FILEDEF list   DISK list.txt
 FILEDEF master DISK list.mas
-RUN
 
-WRITE master FILENAME=LIST, SUFFIX=DFIX, $
-WRITE master  SEGMENT=LIST, SEGTYPE=S0,  $
-WRITE master   FIELD=Record, , A300, A300, $
-WRITE master   FIELD=DELIMITER, ALIAS='&dlm', A1, A1,$
 
 SET PAGE=NOLEAD,LINES=998
 
 DEFINE FILE list
 Pathfile/A200 = TOKEN(Record,':',1) | ':' | TOKEN(Record,':',2);
 Line/A10      = TOKEN(Record,':',3);
 length/I11    = CHAR_LENGTH(RTRIM(Pathfile)) + CHAR_LENGTH(RTRIM(Line));
 Found/A200V   = SUBSTRING(Record, length+3, 200);
 File/A100     = TOKEN(Pathfile,'\',-1);
 Posit/I9      = POSITION(File, Pathfile);
 Path/A200     = SUBSTRING(Pathfile, 1, Posit-1);
 END
 
 TABLE FILE list
   PRINT File
         Found    AS '&Mesg' 
      BY Path      
      BY Pathfile NOPRINT
 ON TABLE SET STYLE *
 TYPE=REPORT, FONT=CONSOLAS, $
 TYPE=DATA, COLUMN=N, SIZE=11, COLOR=SILVER, $
 TYPE=DATA, BACKCOLOR=(RGB(248 248 248) WHITE), BORDER=LIGHT, BORDER-COLOR=RGB(240 240 240), $
 ENDSTYLE
 END
  



WebFOCUS 8.2.06