IBM Support

Transformation Extender map does not wait for batch file script to finish before moving to next card.

Question & Answer


Question

We have a Transformation Extender map that uses the Batch File (BAT) adapter with the PUT command to run a batch file .bat script that launches another program. The card after that updates a database table (Microsoft SQL Server 2014). Both card settings are set to map scope. The database update is using the MDQ file with the -UPDATE command. We have noticed that the .bat script will run for a long time and the map will continue processing the next card before the previous card is done. However, it does not commit until the map is complete. The database table is being locked the entire time that the .bat script is running. One of the fields being updated is using the CURRENTDATETIME() function. The time populated is the about the same time as when the .bat script was kicked off and not the time that the map completed. Is there a way to make the map wait until the bat script is finished before continuing on to the next card?

Answer

Use the GET() function instead of PUT() to call the batch file because GET() will wait for a response and PUT() just executes the command. As the GET() function should return something in order for it to work properly, specify something simple, such as a "ECHO Done" at the end of the batch file to accommodate.

[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Batch File Adapter","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"9.0","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
01 August 2018

UID

swg22011139