Thanks,
here is the solution using LOC:
I have a table called MEASURES with two character variables and two numeric variables. I create two matrices:
use work.MEASURES;
read all var {ICG MEASURE} into MEASURES_CHAR;
read all var {REPORTINGDATE VALUE} into MEASURES_NUM
close work.MEASURES;
Then i create a module which extracts some value of MEASURES_NUM based on a filter using charachter and numeric variables as well:
start getMeasure(MEASURES_CHAR, MEASURES_NUM, repDate, icgid, fmeasure);
IDX_CHAR = LOC(MEASURES_CHAR[,1] = icgid & MEASURES_CHAR[,2] = fmeasure);
IDX_NUM = LOC(MEASURES_NUM[,1] = repDate);
IDX = xsect(IDX_CHAR, IDX_NUM);
measure = MEASURES_NUM[IDX, 2];
return (measure);
finish;
The IDX array is an intersection between IDX_CHAR and IDX_NUM using the xsect function....