RECIDENT - 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

The RECIDENT function can be used, when there are multiple record types within a source datastore, to identify the specific record being processed. This allows you to control the processing of various record types within the source datatore. This function returns the value of the record identifier field that was defined with a corresponding IDENT command. These identifier fields can be different source fields. The IDENT command makes this transparent to the RECIDENT function.

Category

Specialized

Syntax

RECIDENT(<datastore>)

Parameter and Description

Parameter Description
datastore This parameter specifies the name of the source datastore containing the multiple record types.

Example

Given a source datastore (INPUT_DS) that contains two (2) record types (Company and Vendor).

Note: While there will generally be one field at a common offset in the source datastore that identifies the record type source field, there may be lower level references to different fields for each record type as in the example below.

The IDENT commands specify that when source field SRC_ID_FLDA = 'C', a Company record has been read. When SRC_ID_FLDx = 'V', a Vendor record has been read.

Check the field identifier of the record within the source datastore. If a company record has been read, call the mapping procedure P_MAP_COMPANY_RCD. If a vendor record has been read, call the mapping procedure P_MAP_VENDOR_RCD.
IDENT INPUT_DS.src_id_fielda  'C';
IDENT INPUT_DS.src_id_fieldb  'V';

PROCESS INTO OUTPUT_DS
SELECT
{
   CASE
   WHEN RECIDENT(INPUT_DS) =  'C'
       CALLPROC(P_MAP_COMPANY_RCD)
   WHEN RECIDENT(INPUT_DS) =  'V'
       CALLPROC(P_MAP_VENDOR_RCD)
}
FROM CDCIN;