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.  Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/01/11 01:42 AM

    Originally posted by: swatiroi


    Hi All,

    I am running map using WTX java api. Before running map I am setting some properties for the map like map file location, input data file location, trace and log file location etc. Map executes perfectly. Only problem is logs and traces are getting generated in the same folder/location where I have kept my compiled map file.

    I am not sure what is the problem? Here are lines from prog. which sets the log and trace file -

    map.setTextProperty(MConstants.MPIP_MAP_AUDIT_DIRECTORY_CUSTOM_VALUE, 0, "F:\\logs");
    map.setTextProperty(MConstants.MPIP_MAP_AUDIT_FILENAME_CUSTOM_VALUE, 0, "mymap.log");
    map.setTextProperty(MConstants.MPIP_MAP_TRACE_DIRECTORY_CUSTOM_VALUE, 0, "F:\\logs");
    map.setTextProperty(MConstants.MPIP_MAP_TRACE_FILENAME_CUSTOM_VALUE, 0, "mymaptrace.mtr");

    So its expected to generate the log an trace file in the logs folder but instead logs and traces are getting generated in "F:\\map" directory where the compiled map is present. Also as by default the log and trace file names takes the same name as the map file name - mymap.log and mymap.mtr

    Am i missing anything? Any help/pointers will be really appretiated.

    Thanks in advance.

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


  • 2.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/01/11 08:11 AM

    Originally posted by: jvanboga


    The default location for logs and trace files of any kind are the compiled map directory. You'll either need to build your maps with the path you desire or overide the related paths at run time.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/01/11 08:57 AM

    Originally posted by: swatiroi


    thanks for the reply.

    If i understood it correctly you mean to say i need to override the path at run time. Is it not the same thing which i have done to set the custom path just before execution of map?
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 4.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/01/11 09:33 AM

    Originally posted by: jvanboga


    Is 'f:\\logs' on the same machine as the map or on your network somewhere?

    Normally you'd override your log file locations as "F:\\logs\\mymap.log" and "F:\\logs\\mymaptrace.mtr"
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 5.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/01/11 09:36 AM

    Originally posted by: jvanboga


    If you continue to have a issue, post an example of your map execution rule.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 11/02/11 01:26 AM

    Originally posted by: swatiroi


    still facing the same issue...compiled map and the log file location are on the same machine.

    Here is code written to execute map using java api -
    map = new MMap("F:\\map\\MyMap.mmc");
    MCard inputCard = map.getInputCardObject(1);
    MAdapter fileInputAdapter = inputCard.getAdapter();

    fileInputAdapter.setTextProperty(MConstants.MPIP_ADAPTER_COMMANDLINE,0,"F:\\data\\mydata.dat");
    map.setTextProperty(MConstants.MPIP_MAP_AUDIT_DIRECTORY_CUSTOM_VALUE, 0, "F:\\logs");
    map.setTextProperty(MConstants.MPIP_MAP_AUDIT_FILENAME_CUSTOM_VALUE, 0, "mymap.log");

    map.setTextProperty(MConstants.MPIP_MAP_TRACE_DIRECTORY_CUSTOM_VALUE, 0, "F:\\logs");
    map.setTextProperty(MConstants.MPIP_MAP_TRACE_FILENAME_CUSTOM_VALUE, 0, "mymaptrace.mtr");

    map.run();

    iRC = map.getIntegerProperty(MConstants.MPIP_OBJECT_ERROR_CODE, 0);
    String szMsg = map.getTextProperty(MConstants.MPIP_OBJECT_ERROR_MSG, 0);
    Any inputs to resolve the issue or anything am missing or doing wrong?

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


  • 7.  Re: Setting Custom name and location for Log & Trace file using WTX Java API

    Posted 12/14/11 02:08 AM

    Originally posted by: gudezhi


    this maybe works.

    map.setIntegerProperty(MConstants.MPIP_MAP_TRACE_DIRECTORY, 0, 0);
    map.setTextProperty(MConstants.MPIP_MAP_TRACE_DIRECTORY_CUSTOM_VALUE, 0, "C:\\temp\\logs");
    map.setIntegerProperty(MConstants.MPIP_MAP_TRACE_FILENAME, 0, 0);
    map.setTextProperty(MConstants.MPIP_MAP_TRACE_FILENAME_CUSTOM_VALUE, 0, "mymaptrace.mtr");
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange