IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
 View Only
  • 1.  Question on lasterrorcode function

    Posted Mon June 14, 2004 04:10 AM

    Originally posted by: SystemAdmin


    Hello, i want to know if the lasterrorcode() keep in memory the last error code of the last bad execution of a get function (it seems to be the case) or is it reseted if a good execution of a get function occurs. My problem is that i have a functionnal map that makes get and put and i want to do something if one of the get or put doesn't work properly but i have nothing to do if it works good.

    Thanks in advance.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Question on lasterrorcode function

    Posted Mon June 14, 2004 04:37 AM

    Originally posted by: SystemAdmin


    You could use the Vaild function on the GET and PUT
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Question on lasterrorcode function

    Posted Mon June 14, 2004 04:40 AM

    Originally posted by: SystemAdmin


    There is a few things that you could do, one is to have a a rule that looks like this:
    =EITHER(VALID(PUT("file","c:\mercator6.7\file.txt",PACKAGE(Input)),"The put for file 'file.txt' failed because of "+LASTERRORCODE()),"The file 'file.txt' was placed successfully")

    Because if the PUT does not error out, VALID does not execute the second argument, because nothing is produced in the first argument of the EITHER, it executes the second argument. (Essentially doing two functions in one). However, if something does go wrong in the PUT, it will show that, and the second argument in EITHER will not be executed.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender