Step 4 Add a Variable Batch Number to the Processing Sequence

LANSA Composer

Step 4. Add a Variable Batch Number to the Processing Sequence

LIC004 - Add the Transformation to the Processing Sequence

In this step, instead of the constant value of iii123 for the Batch number, you will change the Processing Sequence to use a next number activity. This way you can tell which is the latest addition to the tables TUTORDH and TUTORDL.

1.   On the Activities tab, locate the NEXTNUMBER Generate the next number activity, in the Variable Manipulation group. .

2. Add (double-click or drag and drop) this Activity to the sequence before the Transform. We will use this Activity to assign a variable BATCHNO.

3.  Select the NEXTNUMBER Activity in the sequence.  The parameters for this Activity will then be shown in the Parameters tab (bottom right). Against these parameters you need to identify which values and variables are to be used.

a.  For the NUMBERKEY1 parameter, set the Variable or value for parameter to 'TUTORIAL'. You may type the value with or without the quote marks.  If you do not type the quote marks, LANSA Composer will add them later.

b.  For the NUMBERKEY2 parameter, set the Variable or value for parameter to 'BATCHNO'.  Using these two "key" values means that the batch number will be generated from a series that is common to all processes that use the same values (that is, a series that is common to all users of these tutorial exercises).

c.  For the NUMBEROUT parameter, set the Variable or value for parameter to &BATCHNO. This means that the number assigned by this activity will be placed in a processing sequence variable named BATCHNO.

4.  Select the Transform in the sequence.

a.  In the Parameters tab (bottom right), find the parameter iiTUTMAP_2 BatchNumberSourceParameter.

b.  Delete the Parameter value of iii123. For the Variable or value for parameter enter &BATCHNO or drag and drop from the Variables tab (top left).

     This means that the value for BATCHNO output by the Activity NEXTNUMBER will be used as the input value by the Transformation.

5.  Save your Processing Sequence.

6.  Run your Processing Sequence. Look at the log (View Log tab) to check the batch number allocated:

7.  Check the database tables, TUTORDH and TUTORDL again, using SQL. You will see that additional entries have been added to the tables and that the Batch Number is a different number.

8.  Exit the Processing sequence editor.