Running a mapping using a prefilled script

One way to run a mapping is to use a modified executeMapping.bat file.

About this task

Before you run the mapping, you need to enter all the necessary parameter values inside the executeMapping.bat file.

File parameters

The file executeMapping.bat is in the bin subdirectory in the Integration Composer installation directory. You can edit the parameter values and create different files for different mappings.

There are two sections of the file that you can edit for mapping processing:
  • Delete last scan history option

    This section implements the -delete option:

    REM =======================================
    REM CHECK FOR DELETE LAST SCAN HISTORY FLAG
    REM =======================================
    set DELETE=
    if not {%1} == {-delete} goto setPropFile
    set DELETE=%1
    shift

    You can edit this section as follows to delete the last scan history during mapping processing:

    Example 1
    REM =======================================
    REM CHECK FOR DELETE LAST SCAN HISTORY FLAG
    REM =======================================
    set DELETE=
    if not {%1} == {-delete} goto setPropFile
    set DELETE=-delete
    shift
  • Identification parameters

    This section implements the following identification parameters:

    set MAPPINGNAME=%1
    set REPOSITORYUSER=%2
    set REPOSITORYPWD=%3
    set SOURCEUSER=%4
    set SOURCEPWD=%5
    set TARGETUSER=%6
    set TARGETPWD=%7
    The identification parameters are defined as follows:
    MAPPINGNAME
    The name of the predefined mapping; for example, "Tivoli® to DPA".
    REPOSITORYUSER
    The login user name for the Integration Composer repository; for example, maximouser.
    REPOSITORYPWD
    The login password for the Integration Composer repository; for example, maximopw.
    SOURCEUSER
    The login user name for the data source of the discovered source data; for example, discovereddata.
    SOURCEPWD
    The login password for the data source of the discovered source data; for example, discoveredpw.
    TARGETUSER
    The login user name for the target database; for example, maximouser.
    TARGETPWD
    The login password for the target database; for example, maximopw.

    You can edit this section as follows to specify values for the various identification parameters to use during mapping processing:

    Example 2
    set MAPPINGNAME="Tivoli to DPA"
    set REPOSITORYUSER=maximouser
    set REPOSITORYPWD=********
    set SOURCEUSER=discovereddata
    set SOURCEPWD=********
    set TARGETUSER=maximouser
    set TARGETPWD=********
    If any parameter value contains spaces, enclose the value in quotation marks, as follows:
    set MAPPINGNAME="Tivoli to DPA"
    If any parameter value represents a database null, enter two single–quotation marks without a space in between. For example, if you do not have a password for a database, enter two single–quotation marks for this parameter value, as follows:
    set TARGETPWD=''

Using a scheduling program

You can use a scheduling program, such as Windows scheduler, to run mappings. If you use a Windows scheduler, comment out the line containing the pause command:

:exit
@echo Integration Composer has finished
REM pause

The steps for running the mapping follow:

Procedure

  1. Edit the script.
    1. Open any text editor, such as Microsoft Notepad.
    2. Navigate to the installation_dir\bin directory and open the executeMapping.bat file (Windows environments) or executeMapping.sh file (UNIX environments).
    3. (Optional.) To delete the last scan history before running the mapping, add the -delete option to the file, as shown previously in Example 1.
      Attention: When using the -delete option, be sure to remove your entry after running the file, so that the last scan history is not inadvertently deleted the next time you run the file. Alternatively, you can run the file by specifying the -delete option and your identification parameters on the command line, rather than by modifying the file itself. See Running a mapping by supplying parameter values in a command for details on this alternative.
    4. To configure the file for unattended mapping processing, modify the identification parameters by substituting appropriate values, as shown previously in Example 2.
    5. Save the modified script and close the editor.
  2. Run the script
    1. If Integration Composer is open, close the application.
    2. Open a command prompt.
    3. Navigate to the bin subdirectory in your Integration Composer installation directory, installation_dir\bin.
    4. On the command line, type one of the following and press Enter:
        Windows: executeMapping
        UNIX: ./executeMapping.sh
      The output displays on your screen.
    5. Press Enter to close the task.


Feedback