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.
- Insert an SQL Where Condition using the Insert / SQL-WHERE Condition menu option.
- Link the XEMPLOYEE file to the table element of the SQL-Where, this will open the SQL-Where properties dialog:
When connecting to IBM i define the selection as
XDEPTMENT = :Department_InWhen Connecting to WindowsDefine the selection as
xDepartmentCode = :Department_In(Note the colon - and lack of space - before Department_In.) This will define an input parameter – see the example below.
Note
XDEPARTMENTCODE is the name of the department code field in the file XEMPLOYEE, which the transformation is reading.- Click the OK button to save these changes. Your map window should now look like the following:
- Use the Function / Insert Input menu option to define an Input parameter.
Define a string input called Department_In and click OK.
You can also define a default value and use this in Mapforce to produce sample output. Specify a design time execution value of 1700- Link the Input function to the SQL-WHERE Condition and link the SQL_Where result output to the text file Rows, as shown below.
- Use the Save icon to save your transformation map. Note that the messages area at the bottom left of Mapforce should look like the following:
Select Output tab. Provided you specified a default value in the Input parameter, this will show the employees which will be selected.
Note
This view has been scrolled to the right, to show the Department Description column which has been retrieved from the related table XDEPARTMENTS.- Close Mapforce.









