RBA-DX aFunctions

DX_CLOSE

DX_CLOSE(DXHandler handler)

Closes and deallocates the resources which was used for the Data exchange profile.

Arguments:
  • handler (DXHandler) – The data exchange handler object.

Example:

T_HANDLER = DX_INIT("TEST2_DX")
=FAMILY_EXEC("GET_DATA_FOR_TS_PAIR1")
=DX_CLOSE(%T_HANDLER)

In the above example the last line shows how to call the DX_CLOSE function on a DX handler object.

DX_INIT

DX_INIT(String dxProfile)

Initialize and allocate the resources for a Data exchange profile to execute.

Arguments:
  • dxProfile (java.lang.String) – The data exchange profile name.
Return-type :

com.adaplink.ep.commons.dx.DXHandler

Returns:

DXHandler object.

Example:

T_HANDLER = DX_INIT("TEST2_DX")

The above examples initializes the execution of data exchange profile TEST2_DX and gives the data exchange handler object to proceed with the retrieval of data with the execution of TS_PAIR.

DX_OPEN_READ

DX_OPEN_READ(String dxProfile, String tsPair[, Array columnNameArray_Encoded])

Initializes a data exchange profile and then execute the given TS pair.

Arguments:
  • dxProfile (java.lang.String) – The data exchange profile to be executed.
  • tsPair (java.lang.String) – The TS pair name which is to be executed.
  • columnNameArray_Encoded (java.util.Array) – The encoded names of the columns for which the TS pair will be called.
Return-type :

ITERATOR<>

Returns:

Iterator.

Example

LoopAt Iterator : =DX_OPEN_READ("TEST2_DX", "yalk3ems", "PROFILE_NAME&MIGRATION_KIND")
Into Object => : T_DX_LINE

In the above example T_DX_LINE is a HeaderLine object for the output standard table retrieved after the execution of the TS pair “yalk3ems” under the data exchange profile “TEST2_DX”. The T_DX_LINE object will have only two columns i.e., PROFILE_NAME and MIGRATION_KIND.

DX_READ

DX_READ(DXHandler handler, String tsPair[, Array columnNameArray_Encoded])
Execute a TS pair under a data exchange profile.
Arguments:
  • handler (DXHandler) – The data exchange profile handler.
  • tsPair (java.lang.String) – The TS pair name which is to be executed.
  • columnNameArray_Encoded (java.util.Array) – The encoded names of the columns for which the TS pair will be called.
Return-type :

ITERATOR<>

Returns:

Iterator.

Example

T_HANDLER = DX_INIT("TEST2_DX")
=FAMILY_EXEC("EXECUTE_TS_PAIR_YALK3EMS")
=DX_CLOSE(%T_HANDLER)

The above RBA assignments creates a DX Handler for the DX profile TEST2_DX and then calls the family which continues to execute the TS pair “YALK3EMS”. Following lines show how DX_READ function can be used to get the HeaderLine object in the family “EXECUTE_TS_PAIR_YALK3EMS”

LoopAt Iterator : = DX_READ(%T_HANDLER, "yalk3ems", "PROFILE_NAME&MIGRATION_KIND")
Into Object => : T_DX_LINE

HDRLINE_GET_BY_INDEX

HDRLINE_GET_BY_INDEX(HeaderLine headerLine, Integer index[, Object returnIfBlank])

Retrieves the value under a column in header line. The column is accessed by its index.

Arguments:
  • headerLine (com.adapchain.common.table.HeaderLine) – A header line object from which the column value to be retrieved.
  • index (java.lang.Integer) – The index of the column for which the value to be retrieved.
  • returnIfBlank (java.lang.Object) – (Optional) The value to be returned if the column value retrieved is blank.
Return-type :

java.lang.Object

Returns:

The value under a column in header line.

Example

LoopAt Iterator : =DX_OPEN_READ("TEST2_DX", "yalk3ems", "PROFILE_NAME&MIGRATION_KIND")
Into Object => : T_DX_LINE

In the above example T_DX_LINE is a HeaderLine object for the output retrieved after the execution of the TS pair “yalk3ems” under the data exchange profile “TEST2_DX”. The T_DX_LINE object will have only two columns i.e. PROFILE_NAME and MIGRATION_KIND.

Following is the way to retrieve the value from the columns of this header line while executing a loop in a family:

=HDRLINE_GET_BY_INDEX(%T_DX_LINE, 1)
=HDRLINE_GET_BY_INDEX(%T_DX_LINE, 2)

Note

The first index is 1.

HDRLINE_GET_BY_NAME

HDRLINE_GET_BY_INDEX(HeaderLine headerLine, String columnName[, Object returnIfBlank])

Retrieves the value under a column in header line. The column is accessed by its name.

Arguments:
  • HeaderLine (com.adapchain.common.table.HeaderLine) – A header line object from which the column value to be retrieved.
  • columnName (java.lang.String) – The name of the column for which the value to be retrieved.
  • returnIfBlank (java.lang.Object) – (Optional) The value to be returned if the column value retrieved is blank.
Return-type :

java.lang.Object

Returns:

The value under a column in header line.

Example

LoopAt Iterator : =DX_OPEN_READ("TEST2_DX", "yalk3ems", "PROFILE_NAME&MIGRATION_KIND")
Into Object => : T_DX_LINE

In the above example T_DX_LINE is a HeaderLine object for the output retrieved after the execution of the TS pair “yalk3ems” under the data exchange profile “TEST2_DX”. The T_DX_LINE object will have only two columns i.e. PROFILE_NAME and MIGRATION_KIND.

Following is the way to retrieve the value from the columns of this header line while executing a loop in a family:

=HDRLINE_GET_BY_NAME(%T_DX_LINE, "MIGRATION_KIND")
=HDRLINE_GET_BY_NAME(%T_DX_LINE, "PROFILE_NAME")

HDRLINE_TO_STRING

HDRLINE_TO_STRING(HeaderLine headerline)

This function is used to get a string representation of a HeaderLine.

Arguments:
  • headerline (com.adapchain.common.table.HeaderLine) – The HeaderLine object whose content is to be converted in a string.
Return-type :

java.lang.String

Returns:

A string representation of HeaderLine.

Example

LoopAt Iterator : =DX_OPEN_READ("TEST2_DX", "yalk3ems", "PROFILE_NAME&MIGRATION_KIND")
Into Object => : T_DX_LINE

In the above example T_DX_LINE is a HeaderLine object for the output retrieved after the execution of the TS pair “yalk3ems” under the data exchange profile “TEST2_DX”. The T_DX_LINE object will have only two columns i.e. PROFILE_NAME and MIGRATION_KIND.

Following is the way to get a string representation of this header line while executing a loop in a family:

=HDRLINE_TO_STRING(%T_DX_LINE)

Table Of Contents

Previous topic

RBA aFunctions

Next topic

String aFunctions

This Page