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.  GETRESOURCEALIAS

    Posted 02/12/08 04:09 PM

    Originally posted by: SystemAdmin


    Please help with the format of the GETRESOURCEALIAS function?

    I'm trying to get the name of a database from my resource registry file, and the Insert Function wizard is not exactly precise with the instructions:

    Return the resource alias value specified in MRN (Resource Registry files).
    Syntax:
    GETRESOURCEALIAS (sinlge-text-expression, single-text-expression)
    Meaning:
    GETRESOURCEALIAS (single-text-expression, single-text-expression)
    Returns a (single-text-item)

    I've tried:
    =DBQUERY ( SQL_Statement PGMSCallFields:Call_Results, "dbName.mdq", resourcelib->GETRESOURCEALIAS( "my.mrn", %my_database_name% ))

    and

    =DBQUERY ( SQL_Statement PGMSCallFields:Call_Results, "dbName.mdq", resourcelib->GETRESOURCEALIAS( "my.mrn", "%my_database_name%" ))

    or even ... DBQUERY is supposed to resolve resource registry ..

    =DBQUERY ( SQL_Statement PGMSCallFields:Call_Results, "dbName.mdq", "%my_database_name%" ))

    And I still get a "Database not found" error when I build the map.

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


  • 2.  Re: GETRESOURCEALIAS

    Posted 02/13/08 04:55 AM

    Originally posted by: SystemAdmin


    I cannot think of a reason why you would want to use this other than assuming it works outside of one of the functions that do the automated tag substitution of resources. (Which would mean you could use these tags anywhere.) I have never used it, but scanning the docs. it appears you need to specify the .MRC not the .MRN.

    =resourcelib->GETRESOURCEALIAS("company.mrc","%company%")

    Also, if your last example fails, and you are running from the designer, you simply have not configured the configuration file properly (see Tools->Options->Run Options) ... or your .MRC and .MRN files are incorrect.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: GETRESOURCEALIAS

    Posted 02/13/08 06:27 PM

    Originally posted by: SystemAdmin


    I should have posted my questions in the correct order.

    1. Using the resource registry as part of the DBQUERY function is failing unexpectedly. In the same map, I can use the resource registry in a Run Map call so the resource registry is set up correctly. The map runs on my pc, and on our development server if I hard code the database name it just won't build using the resource registry name.

    =DBQUERY ( SQL_Statement PGMSCallFields:Call_Results, "PGMS.mdq", "%PGMS_Interface_CostPostingDB%" )

    2. Because I couldn't get the DBQUERY call to work using the resource registry, I tried using the new GETRESOURCEALIAS function. I'm sorry, I tried looking in the resource registry documentation and should have been looking in the functions and expressions document.

    Either way, I couldn't get the GetResourceAlias function to work. The MapDesigner won't even accept it as part of the DBQUERY call. When I try to commit the rule, a message box pops up saying "database-name-litteral-text-item expected."
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 4.  Re: GETRESOURCEALIAS

    Posted 02/14/08 05:16 AM

    Originally posted by: SystemAdmin


    I take you have modified the resource entries in the dtx.ini file to point to your .mrc on the server. Also make sure the .mrc points to the correct .mrn for Launcher, Command and Global.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 5.  Re: GETRESOURCEALIAS

    Posted 02/14/08 09:33 AM

    Originally posted by: SystemAdmin


    From my post above:

    "In the same map, I can use the resource registry in a Run Map call so the resource registry is set up correctly."

    A resource registry entry is also used in the launched system to resolve the name of the triggering source.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 6.  Re: GETRESOURCEALIAS

    Posted 02/19/08 08:29 AM

    Originally posted by: SystemAdmin


    Try posting an example along with the mrc, mrn and ini files
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender