Originally posted by: SystemAdmin
DSTX all versions.
I found an interesting anomaly with the TypeTree COBOL copybook importer.
It imports text fields as size 0 to n (n in this case is 10) and padded to fixed size with spaces.
This seems fine and reads the data ok.
However, I have a 10 character field which I want to test the last character as "-". The data can contain 9 or 10 characters such as
abcdefgh- or abcdefgh--. If I use the rule
IF(Right(datain,1) = !"-", do choice 1 , do choice 2) it always does choice 2. I would have expected the 9 character data to obey choice 1.
However, DSTX treats character 10 as a pad character and so it's not part of the data and therefore the last character is always "-"
If the data is described as min 10 and max 10 then the rule behaves as expected.
I would have thought the cobol importer should have set the min and max values the same - cobol data often contains pad characters that are considered part of the data.
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange