Find in string: @wfind
Posted: Tue Mar 05, 2013 8:29 am
Hi,
I would like to search for a term in a string, and then do some actions. Example:
This doesn't work. It never finds hit in the %barclay_list.
From an attempt with using @wkeep(%barclay_list,%ccy)=%ccy I learned that it doesn't really read the %barclay_list at all. Why?
When I do the following it works:
Thanks in advance,
Dagfinn
I would like to search for a term in a string, and then do some actions. Example:
Code: Select all
%barclay_list = "AUD CAD"
for %ccy AUD CAD CHF EUR
if @wfind(%barclay_list,%ccy)>0 then
fetch(d=Barclays) *_{%ccy}
else
fetch(d=wmreuters) *_{%ccy}
endif
next
From an attempt with using @wkeep(%barclay_list,%ccy)=%ccy I learned that it doesn't really read the %barclay_list at all. Why?
When I do the following it works:
Code: Select all
@wfind("AUD CAD",%ccy)>0
Dagfinn