Originally posted by: SystemAdmin
hi,
I have a map that have
- one input card 'Counter' (that opens a file 'counter.txt' to get a number) and
- one output card 'Calculate' that will do a GETANDSET with the value of input card 'Counter'.
each time the map is called, it will do Counter + 1. The action of GETANDSET will automaticly update the file (as describe in the doc - GETANDSET function):
output card 1 = GETANDSET(Counter, Counter + 1 , 2)
It works fine. I put 1 in the file counter.txt.
first call to the map: the file contains 2
first call to the map: the file contains 3
first call to the map: the file contains 4
...
the problem happens when value = 9 in the file. when calling the map, the value counter will be 9. The value of output card will be 9 + 1 so equal to 10. The GETANDSET increment the value correctly BUT the the automatic uptdate in the file is not correct. the file contains now the character #
the problem seems to appear when the value in the file (the actual counter value) is eq to 9 or 99 or 999 or 9999 etc. when going to a number with one more digit!!
9 + 1 = # (in the file)
99 + 1 = ## (in the file)
999 + 1 = ### (in the file)
Any idea of what is wrong ?? error in my code? Bug in DSTX ?
thanks in advance !!!
Stephane
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange