Skip to content

Tips & Tricks - Method List Procedures

There are many options for Method List setup. Here we explain how to make procedure calls.
Other links: Parse variables between methods, Parse ATTR-strings to methods

Calling Procedures From Method List

Here is a case where we want to change ABC-class for already inserted Inventory Parts.

  1. We use same file-layout as in previous examples, but have added ABC_CLASS to the File Job. ABC-class is only entered for values different from default class A.

2. From the Migration job, we could have defined a standard Modify__ method for Inventory Part, but here we want to use the dedicated procedure Inventory_Part_API.Modify_Abc_Class

3. Using Method List Attribute in Method List Tab we can now see the parameters of this method, in same manner as columns from views, but Description shows parameter info, and they have Flags = ARG

  1. Under Source Mapping Tab, all IN-parameters for the method are listed, and we may connect them to a Source Column from our data source, using default values or any SQL-expression, as we do for standard jobs. If View Name is empty on the Method List, the Column Names will be prefixed with the text 'METHOD' concatenated with method sequence

Now we are ready to execute the job. Mapped values will be parsed as IN-parameters for the procedure.

How is the Procedure Executed?

The procedure specified will not be executed directly, but is encapsulated in a stored procedure with a standard interface. This procedure will be generated in the database each time you start the job, and will be Dropped after execution.

If you activate rule KEEPDYNAMPROC , the procedure will be generated once, and remain stored in the database. Enable this rule if the Migration Job is executed frequently.

The procedures name is generated according to this naming-convention: IC_||<Job ID>||Method sequence

Show Procedure Stamenet command on the Method List will show you what the procedure look like:

Setting ConditionsFor Method Execution

We do not want this procedure to execute for each row on the file, only those which have a value in ABC-class (see top of page).
In order to obtain this, we may use the columns Column Name and Column Value to make conditions like this:

  1. From LOV on Column Name you may choose columns under Source Mapping. We want to tie a condition to the value of ABC_CLASS_
  2. If ABC class has any value, the method will be executed. You may enter specific values or use wildcards, but no functions are allowed. If you leave Column Value empty, the method will execute on NULLVALUE.

For more options on execution control, look here >>

Calling Functions from Method List

We may now also invoke functions from the Method List. They will be handled in Method List Attributes in the same manner as procedures.

  1. The return-value from the function is defined as OUT-parameter FUNCTION_RESULT.
  2. The IN-parameter is defined in same manner as parameters for procedures.

3. The result of the function may be used in following methods.