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
  • 1.  EDI template - retaining leading spaces

    Posted Fri February 28, 2003 10:41 AM

    Hi,
    We are using EDI template to convert the record list to a flat file. One of the fields in record should have leading spaces. When I use getTemplate service and conertToString, leading spaces disappear and variable is left justified.

    This variable is defined in template as:

    Is there a way to retain the leading spaces while converting record list to flat file using getTemplate.

    Any help is much appreciated.

    Thanks,
    Sridhar


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


  • 2.  RE: EDI template - retaining leading spaces

    Posted Fri February 28, 2003 11:02 AM

    I see a solution in this forum to change position and length if leading spaces are always of same length. It wouldnt work for me as the length varies every time.

    Thanks,
    Sridhar


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


  • 3.  RE: EDI template - retaining leading spaces

    Posted Fri February 28, 2003 11:16 AM

    I had once a similar problem. My solution (simple but it worked) was to use another symbol instead of spaces and after ConvertToString I then used Replace to get the symbol replaced by blank spaces.
    Maybe others have a nicer solution, but I know at least this one works.


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


  • 4.  RE: EDI template - retaining leading spaces

    Posted Fri February 28, 2003 11:58 AM

    Thanks much. This works great. Simple solution too!!!
    Sridhar


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