Conditionals Settings Examples - trillium_discovery - trillium_quality - 17.1

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Trillium > Trillium Discovery
Version
17.1
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
Topic type
How Do I
Overview
Configuration
Reference
Administration
Installation
First publish date
2008

The following settings are used in the Transformer Unified Output process for the US project to create properly formatted name and address labels. Five (5) additional attributes (NEWADDRL1-5) are generated with the new name and address:

  • NEWADDRL1. Name line.
  • NEWADDRL2 - NEWADDRL5. Delivery address lines.

Name Section

---------------------------------------------------------------------------------------

<ENTRY_ID>1</ENTRY_ID>

<FOR_FILES>OUTPUT</FOR_FILES>

<CONDITION>SUBROUTINE

/* Build name line from individual fields

IF(ALWAYS)

IF (INPUT.PR_NAME_FORM_01 = "1")

SET NAME_SOURCE = "Standard"

SET NEWADDRL1 = INPUT.PR_NAME_RELATION_RECODED_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_NAME_PREFIX_RECODED_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_GIVEN_NAME1_ORIGINAL_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_GIVEN_NAME2_ORIGINAL_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_GIVEN_NAME3_ORIGINAL_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_GIVEN_NAME4_ORIGINAL_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_SURNAME1_ORIGINAL_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_NAME_GENERATION_RECODED_01

SET NEWADDRL1 = NEWADDRL1 |: INPUT.PR_NAME_SUFFIX_RECODED_01

ELSE

IF(INPUT.PR_NAME_FORM_01 = "2")

SET NAME_SOURCE = "Standard"

SET NEWADDRL1 = INPUT.PR_BUSNAME_ORIGINAL_01

ELSE

IF(INPUT.PR_NAME_FORM_01 = "3")

SET NAME_SOURCE = "Default"

SET NEWADDRL1 = INPUT_LINE_01

ELSE

IF(INPUT.PR_NAME_FORM_01 = SPACES)

SET NAME_SOURCE = "No Name"

SET NEWADDRL1 = SPACES

---------------------------------------------------------------------------------------

In this example, the Transformer will reconstruct the output as follows:

  • If the value of PR_NAME_FORM_01 in the entity INPUT is "1" (personal) then it will put the value "Standard" in NAME_SOURCE, copy the value of the PR_NAME_RELATION_RECODED_01 to NEWADDRL1, and append the values of other attributes, with a space, to NEWADDRL1 in the order specified.
  • If the value of PR_NAME_FORM_01 is "2" (business) then it will put the value "Standard" in NAME_SOURCE, and copy the value of PR_BUSNAME_ORIGINAL_01 to NEWADDRL1.
  • If PR_NAME_FORM_01 is "3" (rejected) then it will put the value "Default" in NAME_SOURCE, and copy the value of INPUT_LINE_01 to NEWADDRL1.
  • If PR_NAME_FORM_01 is empty, then it will put the value "No Name" in NAME_SOURCE, and blank out NEWADDRL1.

Address Section

---------------------------------------------------------------------------------------

<ENTRY>

<ENTRY_ID>2</ENTRY_ID>

<FOR_FILES>OUTPUT</FOR_FILES>

<CONDITION>SUBROUTINE

/* Matched routine address

IF(ALWAYS)

SET NEWADDRL2 = INPUT.US_GOUT_URBAN_CITY_NAME

SET NEWADDRL3 = INPUT.US_GOUT_DELIVERY_ADDRESS

SET NEWADDRL4 = INPUT.US_GOUT_POSTAL_CITY_NAME |: INPUT.US_GOUT_STATE_NAME

SET NEWADDRL5 = TRIM(SUBSTR(INPUT.US_GOUT_POSTAL_CODE , 0 , 5))

SET NEWADDRL5 = TRIM(NEWADDRL5) || "-" || TRIM(SUBSTR(INPUT.US_GOUT_POSTAL_CODE , 5 , 4))

ENDIF

---------------------------------------------------------------------------------------

In this example, the Transformer will reconstruct the output as follows:

  • The Transformer will copy the value of US_GOUT_URBAN_CITY_NAME in INPUT to NEWADDRL2, copy the value of US_GOUT_DELIVERY_ADDRESS to NEWADDRL3, and append the value of US_GOUT_POSTAL_CITY_NAME and US_GOUT_STATE_NAME to NEWADDRL4 with a space.
  • Then it will take first five (5) characters from the position zero (0) of the value of US_GOUT_POSTAL_CODE and copy them to NEWADDRL5.
  • Finally, it will take four (4) characters from the position five (5) of the value of US_GOUT_POSTAL_CODE and append them to NEWADDRL5 with a hyphen.