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.  Initializing Mercator API failed

    Posted 05/04/07 09:50 AM

    Originally posted by: SystemAdmin


    Hi,

    I am trying to call a map from a web application developed in C# in Visual Studio.Net. I have added a reference to dstxInterop.dll, that is included in the C# examples of the development kit for DataStageTx 7.5, to my solution and added the code below:

    private void RunDSTXMap()
    {
    try
    {
    MFactoryClass imFactory = new MFactoryClass();
    imFactory.InitializeAPI(null);

    // Load the Map
    string sMapPath = ConfigurationManager.AppSettings.ToString();
    MMap map = imFactory.MapLoadFile(sMapPath);
    map.Run();
    string responseMessage = map.GetTextProperty(MConstants.MPIP_OBJECT_ERROR_MSG, 0);
    int resuleCode = map.GetIntegerProperty(MConstants.MPIP_OBJECT_ERROR_CODE, 0);
    string mapName = map.GetTextProperty(MConstants.MPIP_MAP_MAP_NAME, 0);

    ....more code here....
    }
    catch (Exception ex)
    {
    throw ex;
    }
    }

    However I can't get passed the .InitializeAPI() line and I don't know why!
    I keep getting the error message "Initialize Mercator API failed". Can anyone tell me what I am doing wrong?

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


  • 2.  Re: Initializing Mercator API failed

    Posted 05/04/07 11:27 AM

    Originally posted by: SystemAdmin


    Some quick things to check:
    • You need to have your Mercator installation directory (commonly refered to as MERCHOME) in your system path in order to find other needed Mercator DLLs.
    • You need to make sure the path to your compiled map (MMC) is correct.
    • If your MMC uses the Resource Registry, the MRN/MRC files used must also be found.

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


  • 3.  Re: Initializing Mercator API failed

    Posted 05/10/07 07:48 AM

    Originally posted by: SystemAdmin


    What are MRN/MRC files?

    I can get the map working from the Command Line Server ok surely the Command Line Server call into the same API's?

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


  • 4.  Re: Initializing Mercator API failed

    Posted 05/10/07 07:52 AM

    Originally posted by: janhess


    .MRN/.MRC are the resource registry files that contain parameters used at run time for executable map .mmc
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Initializing Mercator API failed

    Posted 05/10/07 07:59 AM

    Originally posted by: SystemAdmin


    Where are they located?

    I have the SDK for DataStageTx 7.5 installed plus I have the Design Studio installed for DataStageTx 8.0. When I search both C:\Ascential\DataStageTx_7.5 and C:\Ascential\DataStageTx_8.0 the only .mrn/.mrc files found are empty.mrn and testmaps.mrn in this folder C:\Ascential\DataStageTX_8.0\examples\general\rsrcreg

    Don't have a clue why this falls over on .InitailizeAPI call no matter what code I run.

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