IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  Rules very similar to SQL Subquery not working...

    Posted 06/22/09 05:06 PM

    Originally posted by: SystemAdmin


    Following Rule not returning exact record.

    Rule1:
    =LOOKUP(PPDReason :In1, StatusDate:In1=MAX(EXTRACT(StatusDate :In1,Status :In1="Early Terminated" )) & Status :In1="Early Terminated")

    When StatusDate is hard coded as follows, works fine.

    Rule:2
    =LOOKUP(PPDReason :In1, StatusDate:In1="06/15/2009 00:00:00")) & Status :In1="Early Terminated")

    Rule3:
    Following rule returns correct max date.
    =MAX(EXTRACT(StatusDate :In1,Status :In1="Early Terminated" ))
    I also tried adding single, double quotes etc,,but Rule1 not returing exact record based on Max Date..

    Any help appreciated...

    Many thanks in Advance...
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: Rules very similar to SQL Subquery not working...

    Posted 06/22/09 05:18 PM

    Originally posted by: repanzer


    This MAY be a binding issue. When you reference a field in a statment, it binds it to the statement. It's a known "thing" in WTX and has been since I can remember. In your case StatusDate:In1.

    Can you do this;

    MAX(EXTRACT(StatusDate :In1,Status :In1="Early Terminated" ))

    In the functial map call, so you have the MAX Status:Data as Input5 (or what ever) and change the original statment to;

    =LOOKUP(PPDReason :In1, StatusDate:In1=Input5 & Status :In1="Early Terminated")
    ???

    Try to build the statment so you're not calling the same field twice.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Rules very similar to SQL Subquery not working...

    Posted 06/22/09 11:05 PM

    Originally posted by: SystemAdmin


    Thanks for the response..

    I tried as per your suggestion as follows & did not work. I might be doing something wrong..

    Rule1: Calls functional map f_MapforWithdrawnReason()

    = LOOKUP(PPDReason :In1, StatusDate :In1= f_MapforWithdrawnReason(ListOfStatus :In1) & Status :In1="Early Terminated")
    f_MapforWithdrawnReason()
    =MAX(EXTRACT(StatusDate :In1, Status :In1="Early Terminated"))

    Any thought?

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


  • 4.  Re: Rules very similar to SQL Subquery not working...

    Posted 06/23/09 01:56 PM

    Originally posted by: repanzer


    Just to make sure; this is what I meant;

    f_mapforWithdrawnread(Input1, Input2, MAX(EXTRACT(StatusDate :In1, Status :In1="Early Terminated"))

    Then in f_mapforWithdrawnread,

    LOOKUP(PPDReason :In1, StatusDate :In1= Input3 & Status :In1="Early Terminated")

    If hardcording the value in place of the object name gives you the correct output, it really sounds like binding is the issue.

    In the Functions and Expression guide, it gives some info;

    Object names influence the number of evaluation sets

    In some expressions, the same data object name may appear more than once. The same data object name always refers to the same data object. The same data object name influences the combinations of evaluation sets that are selected.

    For example: BackOrder(s) = Qty Ordered:Record:Order - Qty Received:Record:Order

    When a BackOrder evaluation set is selected, the Record that contains Qty Ordered is always the same Record that contains Qty Received. And an Order is always the same one for one evaluation set. When the same object name is used more than once in the same expression, both references bind to the same object.

    You may want to browse over the examples they give.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Rules very similar to SQL Subquery not working...

    Posted 06/24/09 01:32 PM

    Originally posted by: SystemAdmin


    I tried this & working fine...

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