Call a PROC - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

PROCs are called from within the SELECT sub-command in the Processing section of an Apply Engine script using the CALL function.

Example

Assume that there are two (2) PROCs that contain different mapping logic based on the contents of a status (STATUS) in the source datastore records. These PROCs are defined as follows:
CREATE PROC MAP_CASE1 AS
SELECT
{
   TARGET_FIELD1     =  SOURCE_FIELD1
   TARGET_FIELD2   =  SOURCE_FIELD2
}
FROM SOURCE_DATASTORE;

CREATE PROC MAP_CASE2 AS
SELECT
{
   TARGET_FIELD1     =  ADD(SOURCE_FIELD1, SOURCE_FIELD3)
   TARGET_FIELD2   =  ADD(SOURCE_FIELD2, SOURCE_FIELD4)
}
FROM SOURCE_DATASTORE;
In the main SELECT sub-command, check the STATUS field in the source datastore. If the STATUS field is ‘AAA’ then call PROC MAP_CASE1 otherwise, call PROC MAP_CASE2 as shown below.
SELECT
{
  if  STATUS, = ‘AAA
        CALLPROC(MAP_CASE1)
  else
        CALLPROC(MAP_CASE2)
}
FROM SOURCE_DATASTORE;