Originally posted by: Bhoju
Dear happy programmers,
I am in a process to transform our batch process to run the WTX maps using a java process rather running them with command servers, we are doing a POC now to see if we gain some performance improvement by doing this. .
Now to get started, i written a simple java program which can run the map, program shown below. However my requirements are input and output cards overriding, most of the input card of our maps are fetching data from database and the output cards are mostly creating files or calling a shell scripts on unix environment.
I am seeking some help how to override the cards using a java program and leverage all the features which command server provides in a java process (Audit logging, work files, card overrideing, adapter overriding etc) . Any help and quick answers would be highly appreciated as the POC indeed have some deadlines and i want to approach fast towards the concept proof so that we can allocate some budjet and have the developers further explore this opportunity.
** Code with which i got a jump start **
import com.ibm.websphere.dtx.dtxpi.MMap;
import com.ibm.websphere.dtx.dtxpi.MConstants;
import com.ibm.websphere.dtx.dtxpi.MException;
public class RunMap {
public static void main(String args[]) {
// Initialize the API
try {
MMap.initializeAPI(null);
// Create a map
MMap map = new MMap("Test.aix");
// Run the map
map.run();
// Check the return status
int iRC = map.getIntegerProperty(MConstants.MPIP_OBJECT_ERROR_CODE, 0);
String szMsg = map.getTextProperty(MConstants.MPIP_OBJECT_ERROR_MSG, 0);
System.out.println("Map status: " + szMsg + " (" + iRC + ")");
// Clean up
map.unload();
MMap.terminateAPI();
}
catch (MException e) {
e.printStackTrace();
}
}
}
Thanks
#IBMSterlingTransformationExtender#DataExchange#IBM-Websphere-Transformation-Extender