Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This transformation map needs to support the selection of employees by department code to be inserted into the CSV text file. In this step, you will complete the transformation map by adding an SQL Where Condition, and an input parameter linking the file XEMPLOYEE to the output text file via the SQL Where Condition.

  1. Insert an SQL Where Condition using the Insert / SQL-WHERE Condition menu option.
    Image Modified
  2. Link the XEMPLOYEE file to the table element of the SQL-Where, this will open the SQL-Where properties dialog:
    Image Modified
  3. When connecting to IBM i define the selection as

  4.  
    Code Block
  5. XDEPTMENT

  6. =

  7. :Department_In

    When Connecting to WindowsDefine the selection as

  8. Code Block xDepartmentCode 
  9. xDepartmentCode =

  10. :Department_In 

    (Note the colon - and lack of space - before Department_In.) This will define an input parameter – see the example below.

    Note
    titleNote
    XDEPARTMENTCODE is the name of the department code field in the file XEMPLOYEE, which the transformation is reading.

    Image Modified

  11. Click the OK button to save these changes. Your map window should now look like the following:
    Image Modified
  12. Use the Function / Insert Input menu option to define an Input parameter.
    Image Modified
  13. Define a string input called Department_In  and click OK.

    Note
    You can also define a default value and use this in Mapforce to produce sample output. Specify a design time execution value of 1700

    Image Modified

  14. Link the Input function to the SQL-WHERE Condition and link the SQL_Where result output to the text file Rows, as shown below.
    Image Modified
  15. Use the Image Modified Save icon to save your transformation map. Note that the messages area at the bottom left of Mapforce should look like the following:
    Image Modified
  16. Select Output tab. Provided you specified a default value in the Input parameter, this will show the employees which will be selected. 

    Note
    titleNote
    This view has been scrolled to the right, to show the Department Description column which has been retrieved from the related table XDEPARTMENTS.


    Image Modified

  17. Close Mapforce.