IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

convertToString w leading spaces

  • 1.  convertToString w leading spaces

    Posted Thu August 15, 2002 08:06 AM

    I use convertToString with my own template to create a positional flat file for an interface.
    I have some fields in which I have added leading spaces. However after running convertToString these fields will now have trailing spaces.
    I have no idea of how to get around this problem and the interface will only accept these fields with leading spaces.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 2.  RE: convertToString w leading spaces

    Posted Mon September 16, 2002 09:37 AM

    I ran into the same issue once. This is how I solved it:
    In the process before the convertToString step, I defined the actual length of the variable (trim and length transformers), than dynamically in the template changed the offset and length for the field to the values I needed.
    E.g. if normally the field would start at offset 20 with length 10, if the actual length was 6, I changed in the template the offset to 20 + 10 - 6 and the length to 6
    I hope this works for you too.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards