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.  Deleting rows from table

    Posted 09/07/07 11:46 AM

    Originally posted by: LouK


    We are trying to delete rows from a DB2 tablein a functional map. We have tried using DBQUERY, DBLOOKUP, as well as the PUT command with the DB adapter. The command we are using is:
    VALID(PUT("DB", "-TRACE dbdelete.dat" + " -MDQ mdqpath_and_name" + " -UPDATE" +
    " -DBNAME " + "DBT_XXX" + " -USER " + "xxxxxxxx" + " -PASSWORD " + "xxxxxxxx" +
    " -var TBL_ID = " + FILLRIGHT(FormularyID, " ", 12) + " -var SCHEMA = xxxxx" +
    " -Q DeleteRows" + " -TABLE ARGUS.TBL_NDC_LST_STAT_CDE ", ""),
    FAIL("Failed while deleting from tbl_ndc_lst_stat_cde" + LASTERRORCODE() + ": " + LASTERRORMSG() ))

    The FormularyID is a 10 character field but the column in the table is defined as 12 characters, hence the padding. We're getting an error saying
    FAIL function aborted map:Failed when deleting ID xxxx LASTERRORCODE -1070: The database command line was invalid.

    The query in the mdq file is as follows:
    DELETE from ARGUS.TBL_NDC_LST_STAT_CDE
    where ARGUS.TBL_NDC_LST_STAT_CDE.TBL_ID = '#TBL_ID#'

    The TargetRule > Put > Target is set to Database with -UPDATE as the command.

    Any ideas - am I missing something?
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: Deleting rows from table

    Posted 09/10/07 10:19 AM

    Originally posted by: janhess


    If you're using a .mdq file , why not use the connection details specified in it (user, password,schema). That will reduce the number of parameters you need and will simplify solving your problem. I think the problem is you are specifying a query and a table. It should be one or the other - in this case just the query.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  Re: Deleting rows from table

    Posted 09/11/07 08:04 AM

    Originally posted by: DianeC


    We use an mdq file & have done this with a simple DBQUERY.
    DBQUERY ("delete from table_name where......", "mdq path/filename", "mdq database_name").

    Just set the command line on the card to -UPDATE.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 4.  Re: Deleting rows from table

    Posted 09/11/07 08:13 AM

    Originally posted by: janhess


    I think the card can just be SINK as all the database access is through the DBQUERY. You could use DBLOOKUP also.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender