IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
  • 1.  Calling Stored Procedure

    Posted Tue December 05, 2017 06:03 AM

    Originally posted by: chidroop


    I have to invoke a stored procedure(SP) through the map to insert certain values in a table. If any row fails to insert then transaction rollback should occur and no rows should be inserted.

    Option1: If I am calling the SP in a map rule as

    =DBLOOKUP("exec EDIInsert "+ ##MasterXML Argument:Input+ "," + ##DetailXML Argument:Input ,"-MDQ EDICLAIMSDEV.mdq -DBNAME EDICLAIMSDEV -TRACE -CCARD")

    I am not able to achieve the transaction rollback setting in case of failure. Rollback occured only for the row which failed to insert.

    Option2: I tried to create the type tree corresponding to SP and then in the card setting, I choose PUT -> Database and in commands I mentioned -PROC EDIInsert. My map failed with reason "Target not available" and when I checked the database log file, input parameters passed to SP are trimmed. Actual InputParam1(##MasterXML Argument:Input) for SP is 1200bytes long and InputParam2(##DetailXML Argument:Input) is 800bytes long. But Map is passing only around 300 bytes of data to SP due to which it is failing for invalid input parameter.

    Option3: I tried to use Put function as below:

    PUT("DB", "-MDQ EDICLAIMSDEV.mdq -DBNAME EDICLAIMSDEV -PROC dbo.EDIInsert -TRACE -CCARD",##MasterXML Argument:Input + "," + ##DetailXML Argument:Input)

    It is also failing because SP is expecting 2 input parameters as per database logs. Is there some other syntax through which I can pass 2 different input parameters to SP using PUT Command?

     

    I am aware of only these 3 ways of executing a stored procedure and none of the option is working for me. Please help in successfully executing one of the three options.

     


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


  • 2.  Re: Calling Stored Procedure

    Posted Wed December 06, 2017 07:06 AM

    Originally posted by: PaulBrett


    I believe Option 1 should give transaction rollback, but only if you place it inside a VALID()/FAIL() pair of functions.

    Thank you.

    Paul

    Follow me on Twitter


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


  • 3.  Re: Calling Stored Procedure

    Posted Wed December 06, 2017 08:50 AM

    Originally posted by: chidroop


    I have tried Valid()/Fail() pair as well. It is not giving me the transaction rollback option. Rows which are inserted before failure row are not rolled back. As per Database documentation, -CCARD acts same as -CSTMT when used with DBLOOKUP and DBQUERY functions.


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


  • 4.  Re: Calling Stored Procedure

    Posted Wed December 06, 2017 11:56 AM

    Originally posted by: FentonO


    So don't use =CCARD or -CSTMT then, if you want transaction rollback.

    Fenton O.


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


  • 5.  Re: Calling Stored Procedure

    Posted Thu December 07, 2017 03:49 AM

    Originally posted by: chidroop


    Tried to remove -CCARD, transaction rollback is not happening. 


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


  • 6.  Re: Calling Stored Procedure

    Posted Thu December 07, 2017 04:54 AM

    Originally posted by: PaulBrett


    Are you able to create a simple testcase and raise a Service Request (PMR) with IBM for this?

    Thank you.

    Paul

    Follow me on Twitter


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


  • 7.  Re: Calling Stored Procedure

    Posted Wed December 06, 2017 11:57 AM

    Originally posted by: PaulBrett


    I must confess, I didn't actually spot that your DB command was using -CCARD.

    As Fenton said, just remove it.

    Thank you.

    Paul

    Follow me on Twitter


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