Operations on numeric fields - 7.3

Talend Change Data Capture Reference Guide

Version
7.3
Language
English
Product
Talend Change Data Capture
Module
Talend Change Data Capture
Content
Data Governance > Third-party systems > Database components (Integration) > Change Data Capture
Data Quality and Preparation > Third-party systems > Database components (Integration) > Change Data Capture
Design and Development > Third-party systems > Database components (Integration) > Change Data Capture
Last publication date
2023-11-09

Operations on numeric fields are performed individually and the calculation precision is determined by the size of the resulting field.

= – Assignment

This assigns a value to a numeric field.

The source and destination of numeric fields may be of different nature and the value is converted when assigned.

FieldR = Field1/Constant/N@n/Null

FieldR receives the contents of field1 with conversion if necessary.

Example :

O.Indice = I.Ind
O.Indice = 100
O.Indice = Null

Compute – Add, subtract, multiply, divide and remainder of division

This computes two values and enters the result in a field. The resulting field may be one of the initial fields.

The source and destination numeric fields may be of different natures and the value is converted when assigned.

 

+: Add Field1 and Field2 to FieldR. 

FieldR = Field1 + Field2/Constant/N@n

-: Substract Field2 from Field1 to FieldR.

FieldR = Field1 - Field2/Constant/N@n

 

*: Multiply Field1 with Field2 to FieldR.

FieldR = Field1 * Field2/Constant/N@n

 

/: Divide Field1 by Field2 to FieldR.

FieldR = Field1 / Field2/Constant/N@n

 

\: Divide Field1 by Field2 and put the remainder to FieldR.

FieldR = Field1 \ Field2/Constant/N@n

 

STR – Convert numeric to alpha (non-AS/400 IBMi)

This is available only on non-AS/400 IBMi sources.

Places the result of a numeric to alpha conversion in a field.

STR b.Field1/N@n TO b.Field2 

 

DCL W.Field_1 NUMERIC 9,2 
DCL W.Field_2 CHAR 15 
 
  W.Field_1 = -15.2
  STR W.Field_1 TO W.Field_2
  TRACE W.field_2 

-00000000015.20 trace