Topic
  • 1 reply
  • Latest Post - ‏2013-01-10T19:49:14Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts

Pinned topic Trailing space ignored in WTX map

‏2013-01-10T16:59:56Z |
We have a scenario where part of a copybook string response is segregated into 2 fields – SYSMSG1 and CC-MSG. The cobol layout is as below -

15 SYSMSG.
20 SYSMSG1 PIC X(23).
20 CC-MSG PIC X(56).

Suppose if the incoming string to the map is 'OVERLIMIT - ENTER AGE, COMMENTS, INDICATE "X", AND REVIEW "ROUTE TO EMPLOYEE' it should be segregated as below
SYSMSG1 = 'OVERLIMIT - ENTER AGE, '
CC-MSG = 'COMMENTS, INDICATE "X", AND REVIEW "ROUTE TO" EMPLOYEE'

This cobol copybook is mapped to an XML schema

The contents of SYSMSG1 + CC-MSG is mapped to an xml element”ExplDesc” in the rule.

The final outcome in ExplDesc field is 'OVERLIMIT - ENTER AGE,COMMENTS, INDICATE "X", AND REVIEW "ROUTE TO" EMPLOYEE' which is wrong because the space before ' COMMENTS' in the original is ignored.

I feel that the issue is not with the string concatenation in the rule but the space in('OVERLIMIT - ENTER AGE, ') is ignored in the SYSMSG1 field as it might be considered as a trailing space.However it is just an assumption.

Please advice what might be the cause of this issue and what possible step/s I can take towards its resolution.
Any help is highly appreciated.

Thanks,
Tridip K Sarma
Updated on 2013-01-10T19:49:14Z at 2013-01-10T19:49:14Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: Trailing space ignored in WTX map

    ‏2013-01-10T19:49:14Z  
    I just made up this map with fixed group with two items sizes 23 and 56 and mapped to the schema (8.3.0.5). The trailing spaces are preserved.

    Can you upload a sample map where you see trailing spaces behavior ?