<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Nancy,<br>
<br>
I believe you are making the same requirement.<br>
<br>
<font color="#cc0000"># This routine requires all tables saved in
ASCII</font>.<br>
<br>
If ABE is not set to ASCII when a processing table is recorded, it
is not in ASCII format.<br>
Therefore, grep will not produce any response.<br>
<br>
We are getting to the same point. I just format my response
differently and I ma not limited to just filepro files.<br>
I could use search_it where I am in /usr/local/bin and search
script as well.<br>
<br>
Richard<br>
<br>
On 12/15/2014 2:26 PM, Nancy Palmquist wrote:<br>
</div>
<blockquote cite="mid:548F4412.7030409@vss3.com" type="cite">Richard,
<br>
<br>
I don't quite understand the requirement for filepro on a *IX
system to do this.
<br>
<br>
I am supplying the script I have used forever:
<br>
#----------------------------------------------------------------------------------------------------------
<br>
# This routine requires all tables saved in ASCII.
<br>
# Nancy Palmquist Many Years Ago - Actual Date lost but prior to
2001
<br>
#
<br>
if test -z "$PFDIR"
<br>
then echo -n "PFDIR(/appl)=";read PFDIR
<br>
fi
<br>
# Program name is really not necessary and can be commented out.
<br>
if test -z "$PFPROG"
<br>
then echo -n "PFPROG(/appl50)=";read PFPROG
<br>
fi
<br>
export PFPROG PFDIR
<br>
echo Programs $PFPROG Data $PFDIR
<br>
read key
<br>
cd $PFDIR/filepro
<br>
echo -n "Files to process (use wildcards if necessary) : ";read w
<br>
echo -n "Grep for: ";read find
<br>
echo -n "Written to /tmp/[ temporary filename] : ";read findnm
<br>
>/tmp/files.print
<br>
>/tmp/grep.$findnm
<br>
for x in $w
<br>
do
<br>
if test -d $x
<br>
then
<br>
echo scanning process $x for $find
<br>
cd $x
<br>
echo $x >>/tmp/files.print
<br>
for t in `ls prc.*`
<br>
do
<br>
tbl=`echo $t | sed '1,$s/prc.//'`
<br>
echo Now searching $x $tbl
<br>
echo "--------------------" $x $tbl
>>/tmp/grep.$findnm
<br>
grep "$find" $t >>/tmp/grep.$findnm
<br>
done
<br>
cd ..
<br>
fi
<br>
done
<br>
less /tmp/grep.$findnm
<br>
#----------------------------------------------------------------------------------------------------
<br>
<br>
<br>
Output lists each filename Process table name and then any
reference to the search term. So if I wanted to find "invoice" I
need to review the process table called c_mkinv in this file.
<br>
<br>
SAMPLE OUTPUT
<br>
-------------------- stjob Pending
<br>
-------------------- stjob Pendingv
<br>
-------------------- stjob automatic
<br>
-------------------- stjob c_accesslvl
<br>
-------------------- stjob c_mkinv
<br>
::lookup inv=invoice r=free -nx:
<br>
::lookup inv=invoice r=(invrec) -nxp:
<br>
:'add technician to invoice if given:lookup tech=stjobtech k=1 i=a
-bxp:
<br>
:inv(4) eq "C" or inv(4) eq "B":it=inv(68);'invoice type
INVOICE/CREDIT:
<br>
:'add line items to invoice - Only need logic that:'happens for an
Open order:
<br>
::'gosub scaninv this looks to see if line is already on
invoice:
<br>
-------------------- stjob cleanup
<br>
-------------------- stjob getItems
<br>
-------------------- stjob getServs
<br>
<br>
Nancy
<br>
<br>
On 12/15/2014 1:51 PM, Richard D. Williams wrote:
<br>
<blockquote type="cite">To All:
<br>
<br>
You may already have something like this, but I thought I would
share.
<br>
It is the holiday season.
<br>
<br>
Merry Christmas/Happy Hanukkah to all,
<br>
<br>
Richard D. Williams
<br>
<br>
Required: all tables must be ascii format.
<br>
If you need to convert all tables in a file, just do this:
<br>
/appl/fp/rcabe filename -ca
<br>
<br>
# cat SEARCH_IT
<br>
rm -f /tmp/$LOGNAME.txt
<br>
for file in `ls -1 $1`; do if grep -q "$2" "$file";
<br>
then echo $file >> /tmp/$LOGNAME.txt; cat $file | grep -n
"$2" >> /tmp/$LOGNAME
<br>
.txt; echo "" >> /tmp/$LOGNAME.txt; fi; done;
<br>
vi /tmp/$LOGNAME.txt
<br>
<br>
i.e.
<br>
[/appl/filepro/r_process_office]# SEARCH_IT "prc.*" "(268)"
<br>
<br>
yields:
<br>
prc.enter_txoag_job
<br>
67:::P_PROC(8)=@TD+"30";P_PROC(9)=@TM;P_PROC(268)=@TD+"0";P_PROC(320)="I":
<br>
<br>
prc.pcp2pcp_owe
<br>
41:::d(8,yymd)=P_PROC(268)+"0":
<br>
58::P_PROC(268) ge "05/03/04":w="P_CHG@a":
<br>
121::P_CLT(116) eq ja and P_PROC(268) ge
P_CLT(@CD):amf_client="Y":
<br>
133::P_PROC(268) ge "05/03/04":w="P_CHG@a":
<br>
192:::d(8,yymd)=franinv(268)+"0":
<br>
205::franinv(268) ge "05/03/04":w="P_CHG@a":
<br>
206::franinv(268) lt "05/03/04":w="P_CHG":
<br>
214::not amf and P_CLT(116) ne "" and franinv(268) ge P_CLT(@CD)
and franinv(214) eq "":jl(9,.)=jl+(famt(n)-(famt(n)-am)):
<br>
219:::hg(8,yymd)=franinv(268)+"0":
<br>
<br>
-------------- next part --------------
<br>
An HTML attachment was scrubbed...
<br>
URL:
<a class="moz-txt-link-rfc2396E" href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20141215/d5f77a9c/attachment.html"><http://mailman.celestial.com/pipermail/filepro-list/attachments/20141215/d5f77a9c/attachment.html></a><br>
_______________________________________________
<br>
Filepro-list mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
<br>
Subscribe/Unsubscribe/Subscription Changes
<br>
<a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>