informatica-powercenterinformatica-cloudiicsinformatica-data-integration-hub

Running a .bat script in IICS informatica using Command task


I am using IICS with A WINDOWS environment. I would like to know if there is any method to run the .bat script using the COMMAND TASK ? I could see steps to run the .bat file in the linux env. but not in windows


Solution

  • You can not run .bat file in linux. So you either have to modify the script to shell or you can install "wine" package in Linux to use it. You have to do this in IICS secure agent server.

    Option 1 - modify the bat script in shell script.
    Option 2 - Install wine in Linux. You can download wine package from https://www.winehq.org/ and install in linux.

    Once installed, change user's bashrc file (~/.bashrc). Add

    export WINEPREFIX=$INSTALL_HOME/.wine/
    export WINEHOME=$INSTALL_HOME/.wine/
    # for 32-bit
    export WINEARCH=win32
    # for 64-bit
    export WINEARCH=win64
    

    Type below script to run your bat_script file in Informatica cmd task.

    wine cmd.exe /c bat_script.bat