Conversion Functions

Truncating part of a numeric expression

Currency information

Date conversion

Retrieving system data

Simple or crossed conversion of an amount

Conversion of an amount with notification of discrepancy

Reverse conversion

About Conversion Functions

You use Conversion Functions to activate modules in the EuroConverter product (entry point 70) to modify date and currency values in a reference table external to Composer:

  • Currency information
  • Date conversion
  • Retrieving system data
  • Simple or crossed conversion of an amount
  • Conversion of an amount with notification of discrepancy
  • Reverse conversion

Conversion Functionsare distinct from Table functions which you use for working with arguments and values in Table objects created within Composer.

The function syntax depends on the function and which of the EuroConverter modules you want to activate. For more information on specific return values and parameters for each conversion function, refer to Overview of $SEARCH Function and EuroConverter User Manual.

$INT(parameter)

Description

Use $INT(parameter) to return the truncated part of a numeric expression.

Syntax

$INT (parameter)

The data type used for the parameter can be either:

  • Decimal (DN numeric, DN signed, DN packed)
  • Integer (Numeric, signed or packed)

Parentheses are mandatory.

Return

Integer

Parameter

The parameter can be any expression that returns a value of Integer or Decimal data type.

Example

$INT(5.1) returns 5

$INT(5.9) returns 5

$INT(-5.1) returns -5

$INT(-5.999) returns -5

$SEARCH("lllt";"70";"CURRENCY:parameters")

Description

Use $SEARCH("lllt";"70";"CURRENCY:parameters") to retrieve currency information.

Syntax

$SEARCH ("lllt"; "70";"CURRENCY:Param_type:Currency_code:Date")

The parentheses and the double quotes are mandatory.

Return

If used in a mapping expression, the result is written to a target field, which must be compatible with the lllt parameter.

Parameters

lllt specifies the length and data type of the portion of the Input-Event segment field you want to extract. The value is an Integer composed of the following:

  • lll - Length of the part of the field (three numeric characters) to be extracted.
  • t - Data type of the part to be extracted from the field (A, N, D).

70

corresponds to the predefined entry point for external calls specific to EuroConverter.

Param_type

Represents the type of parameter returned. Use any of the following values:

  • CONVERSION_RATE
  • DEC_NUMBER
  • ISO_CODE

Currency_code

Date represents the application date

Examples

Refer to the EuroConverter User Manual

$SEARCH("lllt";"70";"DATE_CONVERSION:parameters")

Description

Use $SEARCH("lllt";"70";"DATE_CONVERSION:parameters") for date conversion

Syntax

$SEARCH ("lllt"; "70";"CURRENCY:"DATE_CONVERSION:Date:In_Display:Out_Display")

The parentheses and the double quotes are mandatory.

Return

Target field

Parameters

lllt

70

Date specifies thesource date

In_Display specifiesthe source date format 

  • 2100: current date
  • 4500: DDMMCCYY
  • 4501: DDMMYY
  • 4502: DD-MMCCYY
  • 4503: DD-MM-YY
  • 4504: DD/MM/CCYY
  • 4505: DD/MM/YY
  • 4506: CCYYMMDD
  • 4507: YYMMDD
  • 4508: CCYY-MM-DD
  • 4509: YY-MM-DD
  • 4510: CCYY/MM/DD
  • 4511: YY/MM/DD
  • 4512: MMDDCCYY
  • 4513: MMDDYY
  • 4514: MM-DD-CCYY
  • 4515: MM-DD-YY
  • 4516: MM/DD/CCYY
  • 4517: MM/DD/YY
  • 4518: CYYMMD*

Where:

  • C indicates the century: C=1 means 19, C=2 means 20
  • CCYY indicates the century and year
  • YY indicates the year
  • MM indicates the month
  • DD indicates the day

Out_Display specifies the target date format: see values detailed in In_Display

Examples

  • Refer to the EuroConverter User Manual

$SEARCH("lllt";"70";"SYSTEM_DATA:parameters")

Description

Use $SEARCH("lllt";"70";"SYSTEM_DATA:parameters") for retrieving system data

Syntax

$SEARCH ("lllt"; "70";"SYSTEM_DATA:Date_type")

The parentheses and the double quotes are mandatory.

Return

Target field

Parameters

lllt

70

Date_type

Represents the date format. You can use any of the following values:

  • DAY_DATE
  • HOUR_SYSTEM
  • QUANT_DATE 

Examples

Refer to the EuroConverter User Manual

$SEARCH("lllt";"70";"CONVERSION:parameters")

Description

Use $SEARCH("lllt";"70";"CONVERSION:parameters") for simple or crossed conversion of an amount.

Syntax

$SEARCH("lllt";"70";"CONVERSION:Data_type:Amount:In_currency:Out_currency:Round_method:

In_decimal:Out_decimal:Eur_decimal:Date")

The parentheses and the double quotes are mandatory.

Return

Target field

Parameters

lllt

70

Data_type

Represents the type of data to convert. Use any of the following values:

  • CONVERSION_AMOUNT
  • INTERMEDIATE_AMOUNT

Amount represents the amount to convert

In_currency represents the source currency code

Out_currency represents the target currency code

Round_method specifies which rounding method to use

In_decimalspecifies the number of decimal places for the source currency

Out_decimal specifies the number of decimal places for the target currency

Eur_decimal specifies the number of decimal places for the intermediate amount in Euros

Date

Examples

Refer to the EuroConverter User Manual

$SEARCH("lllt";"70";"DISCREPANCY:parameters")

Description

Use $SEARCH("lllt";"70";"DISCREPANCY:parameters") for conversion of an amount with notification of discrepancy

Syntax

$SEARCH("lllt";"70";"DISCREPANCY:DISCREPANCY_AMOUNT:Amount:In_currency:Out_currency:

Discrepancy_Type:Discrepancy_Decimal:Round_method:In_decimal:Out_decimal:Date")

The parentheses and the double quotes are mandatory.

Return

Target field

Parameters

lllt

70

Amount

In_currency

Out_currency

Discrepancy_type

Specifies the type of differential. Use any of the following values:

  • DISCREPANCY_ORIGINAL
  • DISCREPANCY_SIT
  • DISCREPANCY_TARGET

Discrepancy_decimal specifies the number of decimal places for the differential notification

Round_method

In_decimal

Out_decimal

Date

Examples

    Refer to the EuroConverter User Manual

$SEARCH("lllt";"70";"CONVERSION:parameters")

Description

Use $SEARCH("lllt";"70";"CONVERSION:parameters") for inverted conversion

Syntax

$SEARCH("lllt";"70";"CONVERSION:Data_type:Amount:In_currency:Out_currency:Round_method:

Round:In_decimal:Out_decimal:Eur_decimal:Date")

The parentheses and the double quotes are mandatory.

Return

Target field

Parameters

lllt

70

Data_type

Represents the data type to convert from. Use either of the following values:

  • CONVERTED_AMOUNT
  • INTERMEDIATE_AMOUNT

Amount

In_currency

Out_currency

Round_method

Round represents the differential

In_decimal

Out_decimal

Eur_decimal

Date

Examples

Refer to the EuroConverter User Manual

Back to top

Related Links