IN-OUT PARAMETER IN IICS
In-out parameter:-
An in-out parameter is a placeholder for a value that stores a counter or task stage. Data Integration evaluates the parameter at run time based on your configuration.
In-out parameters act as persistent task variables. The parameter values are updated during task execution.
Procedure:-
INPUT:-
- Go to file manger and check the source file as shown below.
- Login to IICS and click on new mapping.
- Click on create to create new mapping and rename the mapping of your choice for eg:-m_inoutparam.
- Click on the source and rename the source name as required.
- Assign source connections and object name in the source properties.
- Go to Actions and click on the parameters panel.
- Click on the parameter panel and click on (+ ) symbol in in-out parameter and specify the name and datatype and mention the default value as shown below.
- Drag and drop the expression transformation from the left side of the design menu and connect it to the source.
EXPRESSION:-
- In the expression transformation rename the expression as shown below for eg:-exp_inoutparam.
- Click on the incoming fields and check the fields.
- Click on expression option and click on + button to create the variable and output fields.
- Create a variable field by selecting the field type as variable field and give the name as shown below.
Name=v_hireddate
Type=date/time
- A variable field has been created now click on configure.
- Configure the field by assigning the setmaxvariable to the expression as shown below.
SetMaxVariable($$incremental_ts,HIRE_DATE)
- Create an output field by selecting the below options and click on ok.
Name=O_hireddate
Datatype=date/time
- An output field has been created and now click on configure.
- Configure the field by assigning the variable field as shown below.i.e:-v_hiredate
- Click on the target and rename the target as shown below for eg:-tgt_employees.
- Click on the incoming fields and check it
- Click on the target and configure the connections and select the object as shown below.
- Click on save to save the mapping.
MAPPING TASK:-
- Click on new to create the mapping task and give the proper task name and specify the runtime environment.
- Click on select and select the mapping and then click on next.
- In In-out parameters option, we can see the in-out parameter with its default value
- The value to the In-out parameter is passed from expression transformation by using SetMaxVariable and the max value of the hired date will be assigned to the value.
- Click on next and finish.
- Run the mapping task and check the output.
OUTPUT:-
- Here the maximum value has been assigned in in-out parameters by the setmaxvariable.