Step 5 Create Processing Sequence

LANSA Composer

Step 5. Create Processing Sequence

LIC007 - Extract Database to CSV File

In this step you will create a simple processing sequence which will run your file transformation. It will have two input parameters, Department Code and output file name.

Before you begin:

a.  Create a new Database Configuration (iiiTUTDEMO), similar to the one you created in LIC003, Step 7. Set up the Database Configuration.

b.  Copy the Database Configuration iiiTUTDBID.

c.  Give the new Database Configuration a suitable Description.

d.  If necessary, change the Connection string to use the library containing the Personnel Demonstration System files (for example, LICLICLIB).

     Note that you must specify the Database password. Security details are not copied.

e.  Save your new database configuration.

f.  In the Navigator select Definitions / Process Sequences. Use the button to create a new processing sequence. This will immediately open the Processing sequence editor.

2.  Select the Transformations tab from the top left hand tabs, and drag and drop your transformation iiiTUTMAP02 at the end of the processing sequence in the right hand Details tab – see below.

     Note: the Parameters tab (bottom right) has focus and shows the three parameters required by this transformation. They are:

  • EARTHSourceConnection – the name of the DB Source
  • Department_InSourceParameter – the department code for which employees are to be selected
  • TextfileTargetFileName – the name (and path) for the output CSV file.

3.  Select the Configurations tab (top left). Drop the iiiTUTDEMO Database configuration which you just created into the EARTHSourceConnection parameter.

4.  In this step you will define two input parameters for the Processing Sequence.

a.  Select the Variables tab (top left) and select the Parameters tab (top right).

b.  Drag and drop the variables iiiTUTMAP02_2 and iiiTUTMAP02_3 onto the Parameters tab. You can re-sequence them using the toolbar buttons if necessary.

5.  Give each of them appropriate descriptions as shown (these are displayed at run time). Select the Parameter Name iiiTUTMAP02_3 and rename it to FILENAME. Note: you could also provide a default value for each parameter.

6.  Select the Activities tab (top left) and the Details tab (top right). Drag and drop the PATHMAKE activity into the processing sequence before the Transform. You can re-sequence using the buttons if necessary.

7.  Review the Assistant tab for the PATHMAKE activity. These notes explain that the activity will use the correct separator depending on server platform (Windows or System i) and will insert a separator if not specified. In the next steps you will set up parameters for the PATHMAKE activity.

8.Define the PATHIN inbound parameter as '/LANSA_Composer_licpgmlib/lic/Tutorial/'.

     Note: if you do not enter the string within single quotes, they will be added when you save the changes.

     The actual path for the training system settings which you are using can be found via the Navigator, under Administration & Housekeeping / System Settings / Tutorial Files.

     Note: the Processing sequence editor is non-modal. This means you can switch back to the main Composer window to review this information, leaving the Processing sequence editor open.

9.  Define the FILEIN inbound parameter as &FILENAME. This is the input parameter you renamed earlier. It contains the Output File Name.10.Select the Variables tab (top left) and drag and drop the variable iiiTUTMAP02_3 into the outbound PATHOUT parameter of the PATHMAKE activity. This will create /path/filename variable iiiTUTMAP02_3 which is required in the Transform output file parameter.

10. Drag and drop a  from the Palette tab, before the PATHMAKE activity and add suitable comment text in the multi-line edit box below. See example:

11. Add an UPPERCASE activity before the Transform Map. Set its input and output parameters to IIITUTMAP02_02, which is the input department code. Since the file extract uses SQL, this would fail to output to the CSV file if the user enters the department code in lower or mixed case.

12. Click on the Save button to save your processing sequence.  Complete the form with name (iiiTUTSEQ05), description and Status set to Active.