Handling spaces in Positional layouts
Issue:
When using Position Layout as source layout and Text Layout as target layout, a field in the source layout is defined as an integer with a start position of 98, end position of 112,
and length of 15. The field contains both leading and trailing spaces, and the output does not meet the expected formatting when the first 9 digits are spaces and the remaining 6 digits have values.
Case 1:
If a value is "987654321123456", then the expected output should be “987654321.123456”, which is working fine.
Case 2:
If a value is "987654321 " where the first 9 digits are present and the remaining 6 digits are blank spaces, then the expected output should be “987654321.000000”, which is also working fine.
Case 3:
If the first 9 digits are spaces and the remaining 6 are present, then it’s not working as expected.
Example Scenario:
Input: " 763171" (First 9 digits are spaces, remaining 6 digits contain the value)
Expected Output: "000000000.763171"
Actual Output: "76317.000000"
The issue occurs in the integration when the field starts with spaces in the first 9 digits and contains data in the remaining 6 digits. The problem does not appear in the web mapper
debugger, but occurs in the actual integration process.
Solution provided:
1. The required field in the source and target layouts should be of type String, not Integer.
2. Make necessary changes in the Advanced Properties of the source layout. If Remove Space(s) remains checked, all the leading spaces will be automatically removed, which will not generate the desired result.
Please sign in to leave a comment.
Comments
0 comments