I am working on version 2.1.14 and found a strange issue that ItemSkip is not skipping a record, but coming out of the while loop. I have pasted the code below. The moment 'Factor' is hit, it's coming out of the loop. I ran the same code in on our old server - 2.0.92 and found it does the same - exit out of the loop. If I comment the line ITEMSKIP; the code runs all records.
Can someone help me?
Thanks,
Paul.
Code: Select all
processName = 'dimUpdateMonths-Test' ;
logFile = GetProcessErrorFileDirectory | processName | '.txt' ;
dim = 'months' ;
nCounter = 1;
nMaximum = DimSiz(Dim) ;
asciiOutPut ( logFile, 'Max Dim Size', NumberToString( nMaximum ) , NumberToString(nCounter));
WHILE(nCounter <= nMaximum);
sElName = DimNm(Dim , nCounter);
asciiOutPut ( logFile, 'nCounter', NumberToString( nMaximum ) , NumberToString( nCounter ), 'sElName' , sElName);
if (sElName @= 'Factor');
ITEMSKIP;
endif;
nCounter = nCounter + 1;
END;
