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.  Send an email when file fails

    Posted 06/02/15 07:50 PM

    Originally posted by: Dan411


    Hi All

    I am learning wtx. I have a requirement for EDI 834.

    Map  should  send an email to my email id  when file fails map translation with ISA08 and ST02 details for the input file.My output card is using file adapter.

    can some one help me how can i do this.

     

    Thanks in Advance.


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


  • 2.  Re: send an email when file fails

    Posted 06/03/15 10:23 AM

    Originally posted by: edi1999


    We do this in most of our maps using the VALID function.  If the RUN line fails we send an email alert using the EMAIL adapter in WTX.

    As for reporting the ISA and ST information....I've never found an easy way to map from an input file that has invalid data.  I posted about that on here a few years ago and there is a thread on it if you search.  It would be great if you could easily map the offending field to notify the right folks.  As it is now anytime there is a failed file we have to download it and run a trace after it goes through first and second level support.

     

     

     


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


  • 3.  Re: send an email when file fails

    Posted 06/16/15 05:46 AM

    Originally posted by: paul.brett


    You need to have a top-level map that reads the input as a text blob (it can't fail) and then use a RUN() function to call a sub-map to do the actual mapping.  This RUN() should be wrapped in a VALID() function, and then if the RUN() is not successful, you can check the LASTERRORCODE() value, and take problem reporting actions (such as sending an email) from there.

    Because the input was not validated at the top level, you can send a copy as part of the email body text or as an attachment.

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 4.  Re: send an email when file fails

    Posted 06/16/15 06:25 AM
      |   view attached

    Originally posted by: paul.brett


    I have created a small example.  The email I received was:

    "
    File mapped : Y:\SendEmailOnFail\Input.txt
    .
    Content : 
    1100110,Apples,ITEM,401,0.39
    1100120,Oranges,ITEM,876,0.36
    1100170,Bananas,,BUNCH,72,2.64
    1100240,Plums,PUNNET,44,1.39
    .
    Error message : One or more inputs was invalid"
    

    Thank-you.

    Paul.

    Follow me on Twitter


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

    Attachment(s)

    zip
    SendEmailOnFail.zip   13 KB 1 version


  • 5.  Re: send an email when file fails

    Posted 06/16/15 06:27 AM

    Originally posted by: paul.brett


    The example could be improved with a RESTART attribute in the input typetree for the CHILD map, and a REJECT() function to capture only those records that were rejected.

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 6.  Re: send an email when file fails

    Posted 06/17/15 03:06 PM

    Originally posted by: Dan411


    Thank you very much paul.


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