IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

Lookup function and data returned with carriage return line feed

  • 1.  Lookup function and data returned with carriage return line feed

    Posted 03/28/12 04:31 PM

    Originally posted by: harishrad


    I am using Lookup() from a map to pickup data from last column of a pipe delimited file. The records are seperated by <NL> and the fileds do not have an initator or terminator.

    My problem is, when running this map on linux the lookup function is picking up the data from the last column along with carriage return and hence the resulting map output has unwanted carriage return in middle of a record causing downstream systems to fail.
    i tried various options already like CTEXT() with "ASCII", TEXT(), TRIMTORIGHT() and so far no luck.

    what could be wrong?
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Lookup function and data returned with carriage return line feed

    Posted 03/29/12 02:58 AM

    Originally posted by: richlee


    Hi,

    Just use SUBSTITUTE around the LOOKUP function, with "<CR>" and "" for the second and third parameters.
    
    =SUBSTITUTE(LOOKUP(object-to-find, field-to-match = match-text), 
    "<CR>", 
    "")
    


    Richard
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange