morechocolate
Technical User
I am getting an error of missing) for the following formula. I can not figure out why. Please help.
StringVar array AllPriceSource := ["BB","COST","HUBDATA","IDCCURR","LMP","LPC","MANUAL","OTHER","PM","PP","PVT","STREET"];
StringVar HoldPriceSource;
NumberVar cnt;
StringVar ShowPriceSource;
StringVar PriceSource;
StringVar DBLocation := {?CAMRA Location};
StringVar Path := DBLocation + "pricing.dat";
For cnt := 1 to UBound(AllPriceSource) Do
(
HoldPriceSource := AllPriceSource[cnt]
PriceSource = pfGetStrValEQ (Path,3,pfKeyStr ({currhold.CUSIP},pfKeyDate ({@GetCurrentPriceDate},pfKeyStr (HoldPriceSource,"")),"PRICE_SOURCE"
if PriceSource <> "" then
ShowPriceSource := PriceSource
);
ShowPriceSource
If I commit out all or any of the lines after HoldPriceSource := AllPriceSource[cnt] I get the error.
Also, for the more experienced programmers is there a better to do this. Eventually, I also want to make the ShowPriceSource an array and have that array filled with whereever the getvalue function matches the value in the AllPriceArray.
Thank You
Pam
StringVar array AllPriceSource := ["BB","COST","HUBDATA","IDCCURR","LMP","LPC","MANUAL","OTHER","PM","PP","PVT","STREET"];
StringVar HoldPriceSource;
NumberVar cnt;
StringVar ShowPriceSource;
StringVar PriceSource;
StringVar DBLocation := {?CAMRA Location};
StringVar Path := DBLocation + "pricing.dat";
For cnt := 1 to UBound(AllPriceSource) Do
(
HoldPriceSource := AllPriceSource[cnt]
PriceSource = pfGetStrValEQ (Path,3,pfKeyStr ({currhold.CUSIP},pfKeyDate ({@GetCurrentPriceDate},pfKeyStr (HoldPriceSource,"")),"PRICE_SOURCE"
if PriceSource <> "" then
ShowPriceSource := PriceSource
);
ShowPriceSource
If I commit out all or any of the lines after HoldPriceSource := AllPriceSource[cnt] I get the error.
Also, for the more experienced programmers is there a better to do this. Eventually, I also want to make the ShowPriceSource an array and have that array filled with whereever the getvalue function matches the value in the AllPriceArray.
Thank You
Pam