Anyway I'm writing a TI to compare two versions of the same dimension which involves some nesting of while loops and I'm getting some odd behaviour.
The TI script in the prolog
Code: Select all
fileName=CellGetS( 'Server Properties', 'Server side path to dimension backup directory', 'String') | oldDimName | '.cma';
ixDim=1;
mxDim=DimSiz(dimName);
booFound=0;
#New elements in the current dimension structure
While (ixDim<=mxDim);
elName=Dimnm(dimName, ixDim);
If ( Dimix(oldDimName, elName)=0);
ASCIIOutput( fileName, 'L’élément ' | elName | ' est présent dans la dimension courante mais pas dans n’existait pas dans la dimension histor
ique.', 'Type 1');
#List the structure relating to the new element.
#Parents
ixPar=1;
booParFound=0;
mxPar=ElParN(dimName, elName);
#ASCIIOutput (fileName, str(mxPar,10,0));
While(ixPar<=MxPar);
ASCIIOutput( fileName, 'L’élément ' | elName | ' a été rattaché a l’élément consolidé ' | Elpar (dimName, elName,ixPar),'Type 2');
ixPar=ixPar+1;
booParFound=1;
End;
If(booParFound=0);
ASCIIOutput( fileName, 'L’élément ' | elName | ' est un orphelin');
EndIf;
#Children
ixPar=1;
booParFound=0;
mxPar=ElCompN(dimName, elName);
#ASCIIOutput (fileName, str(mxPar,10,0));
While(ixPar<=MxPar);
ASCIIOutput( fileName, 'Un nouvel élément ' | Elcomp (dimName, elName,ixPar) | ' a été rattaché a l’élément consolidé ' | elName | '
de la dimension ' ,'Type 3');
ixPar=ixPar+1;
booParFound=1;
End;
If(booParFound=0);
ASCIIOutput( fileName, 'L’élément ' | elName | ' has no children');
EndIf;
booFound=1;
EndIf;
ixDim=ixDim+1;
End;
If(booFound=0);
ASCIIOutput( fileName, 'No new elements found','Type 4');
EndIf;
ASCIIOutput( fileName, 'Test sequence 1 complete' ,'Type check');
ProcessBreak;
Following the Process Break there are a few other sets of while loops that I have not shown.
I’ve been having a few issues with while loops locking up the server. In debugging this I added the process break and found that with the process break in place the while loops work. When I comment it out the while loops fail and the server locks.
My Ascii output with the break in place, you can see the final ASCIIoutput statement gets executed.
Code: Select all
"L’élément Element 24 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 24 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 24 has no children"
"L’élément Element 25 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 25 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 25 has no children"
"L’élément Element 26 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 26 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 26 has no children"
"L’élément Element 27 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 27 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 27 has no children"
"Test sequence 1 complete","Type check"
Code: Select all
"L’élément Element 24 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 24 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 24 has no children"
"L’élément Element 25 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 25 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 25 has no children"
"L’élément Element 26 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 26 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 26 has no children"
"L’élément Element 27 est présent dans la dimension courante mais pas dans n’existait pas dans la dimension historique.","Type 1"
"L’élément Element 27 a été rattaché a l’élément consolidé Parent 3","Type 2"
"L’élément Element 27 has no children"
Anyone any idea what is going on??? All on version 9.0 latest.