Searching .i and .p files inside a Procedure

sam81

New Member
Qad Mfg/Pro


I have a scenario where i have to search and get all the .p files and .i files written written inside a Program .
pls let me know if there is any utitlity Regarding
 

Cringer

ProgressTalk.com Moderator
Staff member
Do you want to do this at run time, or just find the pieces of code referenced in a particular program as part of a development excercise?
If you want to do it at development time, then you can use Notepad++ or Textpad to do a find in files for .i and .p.
 

sam81

New Member
Progress version 10.2b open edge ,

I am searching for .p and .i calling procedure's inside my main program at runtime.
so if i execute my Query it does not fetch me the Exact .p or .i string which i have used inside my main program


The query

define variable l_text as char .
input from value ("/home/mfg/t.txt").
repeat :
import unformatted l_text .
if l_text matches "*.p" then do :
message l_text view-as alert-box.
end.
end.


But the Query above is fetching all the string which contains "p" alphabet and it dint consider "." which is mentioned before it .
 

Cringer

ProgressTalk.com Moderator
Staff member
That's because . is a wildcard character. * means any number of characters, . means a single character. So that will pull back any string that has at least 1 character before the p. Have you tried "*\.p"?
 

sam81

New Member
Ya i have tried but i don't get the exact output I should get , again it brings Junk value's (string containing "P" with it) .
 

Cringer

ProgressTalk.com Moderator
Staff member
try
Code:
if num-entries([B][FONT=courier new]l_text,".") eq 2 and entry(2,[/FONT][/B][B][FONT=courier new]l_text,".") eq "p" then...
[/FONT][/B]
 

Stefan

Well-Known Member
You need to double tilde-escape the dot single character wildcard:

Code:
MESSAGE 
   "bla.p" MATCHES "*~~.p"
   "blap" MATCHES "*~~.p"
VIEW-AS ALERT-BOX.
 
Top