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.  SQL UPDATE in mdq file

    Posted 11/03/06 03:39 AM

    Originally posted by: SystemAdmin


    Hello,

    I tried this following rule to use an SQL UPDATE stored in a mdq file.
    This rule works when the third parameter INFOLOR is short. The map fails (message = Adapter not found ; code = -9999) if I try to put a longer text.

    very strange ??

    Is there a best way to use a SQL UPDATE or what is wrong in my rule?

    Thanks !

    = VALID(GET("DB", "-MDQ %UPA_MDQ_DIR%/UPA_AAA_Queries.mdq -TRACEERR -DBNAME XLS_Queries -USER aaa -PASSWORD aaaaaa -SOURCE DSKAOSYBA\\aaaingbedb -QUERY Update_XLSSTATUS -VAR FILENAME = " + TEXT(ShortFileName) + " -VAR INFOLOG = " + TEXT("fdhsfkdlfhsdjklffdhsjkflsdhkfjsdkflfd")), FAIL("Failure on GET-DB for Query Update_XLSSTATUS - Card UpdateXlsStatus ; Error code = " + TEXT(LASTERRORCODE()) + " ; Error message = " + LASTERRORMSG()))
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: SQL UPDATE in mdq file

    Posted 11/03/06 04:06 AM

    Originally posted by: janhess


    Try using DBLOOKUP.
    VALID(dblookup("Update_XLSSTATUS -VAR FILENAME = " + TEXT(ShortFileName) + " -VAR INFOLOG = " + TEXT("fdhsfkdlfhsdjklffdhsjkflsdhkfjsdkflfd"),"-MDQ %UPA_MDQ_DIR%/UPA_AAA_Queries.mdq -TRACEERR -DBNAME XLS_Queries -USER aaa -PASSWORD aaaaaa -SOURCE DSKAOSYBA\\aaaingbedb"), FAIL("Failure on GET-DB for Query Update_XLSSTATUS - Card UpdateXlsStatus ; Error code = " + TEXT(LASTERRORCODE()) + " ; Error message = " + LASTERRORMSG()))
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  Re: SQL UPDATE in mdq file

    Posted 11/03/06 04:15 AM

    Originally posted by: janhess


    That's rubish. Didn't read the rule properly.

    You can use the query in place of the first bit in quotes

    =VALID(dblookup("UPDATE QUERY STATEMENT HERE","-MDQ %UPA_MDQ_DIR%/UPA_AAA_Queries.mdq -TRACEERR -DBNAME XLS_Queries -USER aaa -PASSWORD aaaaaa -SOURCE DSKAOSYBA\\aaaingbedb"), FAIL("Failure on GET-DB for Query Update_XLSSTATUS - Card UpdateXlsStatus ; Error code = " + TEXT(LASTERRORCODE()) + " ; Error message = " + LASTERRORMSG()))

    or you can have the query in the mdq as an input card to a map and run that from the first map passing the variables.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: SQL UPDATE in mdq file

    Posted 11/03/06 05:19 AM

    Originally posted by: SystemAdmin


    OK. It works.
    Thanks a lot !!
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: SQL UPDATE in mdq file

    Posted 11/03/06 04:28 AM

    Originally posted by: SystemAdmin


    I tried the DBLOOKUP function but I have the following error code = -1009 (Failed to execute the SQL statement)....

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