FETCH - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
ft:locale
en-US
Product name
Connect CDC (SQData)
ft:title
Connect CDC (SQData) Apply engine
Copyright
2026
First publish date
2000
ft:lastEdition
2026-08-03
ft:lastPublication
2026-08-03T15:57:37.298309
L1_Product_Gateway
Integrate
L2_Product_Segment
Data Integration
L3_Product_Brand
Precisely Connect
L4_Investment_Segment
Application Data Integration
L5_Product_Group
ADI - Connect
L6_Product_Name
Connect CDC

The FETCH function retrieves the next row from an open Connect CDC (SQData) cursor.

FETCH() returns a character value that is typically tested in script logic. If the function encounters an unexpected datastore error, Connect CDC (SQData) sets the job fatal and processing stops.

Important: Connect CDC (SQData) normalizes cursor fetch status for script processing. Do not expect native DB2 SQLCODE values to be returned by FETCH().

Category

Cursor Functions

Syntax

FETCH(cursor_name)

Parameters and descriptions

Parameter Description
cursor_name Name of an already opened cursor created with CREATE RDBMS CURSOR, CREATE VSAM CURSOR, or CREATE IMS CURSOR.

Return values

Value Description
'0' A row was fetched successfully. The fields in the record named by the cursor DESCRIBED BY clause are populated with the current row.
'100' No row was found or the cursor reached end-of-data. For RDBMS cursors this is the Connect CDC (SQData) normalized not-found result. For VSAM cursors, end-of-file and no-match conditions are normalized to the same value.

Usage

  • Only use the DESCRIBED BY fields when FETCH() returns '0'.
  • When FETCH() returns '100', there is no current row and the previously fetched values are not cleared automatically, so those fields may still contain data from the prior successful fetch.
  • Any datastore error other than the normalized no-row condition is treated as a runtime failure. Connect CDC (SQData) does not return arbitrary DB2 SQLCODE values through FETCH() for script logic.

Example

OPEN(SQDATA_RDBMS_CURSOR)

WHILE FETCH(SQDATA_RDBMS_CURSOR) = '0'
 DO
          TARGET_ACCOUNT_ID     = SQDATA_CURSOR_ROW.ACCOUNT_ID
          TARGET_ACCOUNT_STATUS = SQDATA_CURSOR_ROW.ACCOUNT_STATUS
 END

CLOSE(SQDATA_RDBMS_CURSOR)