cancel
Showing results for 
Search instead for 
Did you mean: 

How to Split the message content?

Former Member
0 Kudos

Hi ....

I am having an input File like below format.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_ISO8583 xmlns:ns0="http://axis.com/bank_statement">

<Field1></Field1> -


0 to 1

<Filed2></Filed2> -


0 to 1

<Filed3></Filed3> -


0 to unbounded

</ns0:MT_ISO8583>

Here Field 3 is repeating many times. The value in the Field 3 has to be splitted and should be mapped to the target feilds. Field 3 will stop repeating until when the first value in the field 3 is N.

The length of the field is 142 characters in length.

The field should be splitted based on the following structure.

More data flag : 1 char (u2018Yu2019/u2019Nu2019) This indicates whether there are more records for the given criteria.

Number of statements : 2char (00 to 20) Number of statements in this fetch

The following are repeated as many number of statements

Transaction date : 8 char ( YYYYMMDD )

Transaction Id : 9 char (right justified, left padded with spaces)

Part tran serial num : 4 char (right justified left padded with spaces)

Tran Type : 1 char ( C - Cash, T - Transfer, L - Clearing )

Tran sub type : 2 char ( BI, CI, NP, NR)

Debit credit indicator : 1 char ( D - Debit, C - Credit )

Tran value date : 8 char ( YYYYMMDD )

Transaction Amount : 17 char ( with decimal )

Transaction particulars : 50 Char (left justified, right padded with spaces)

Transaction Posted date : 14 char ( YYYYMMDDHHMISS )

Instrument number : 8 char (right justified, left padded with spaces)

Balance at the end of the transaction : 17 char ( with decimal )

Can you help me , how to split the message content in the field3?

Below is the sample message.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_ISO8583 xmlns:ns0="http://axis.com/bank_statement">

<Field1>930000</Field1>

<Filed2>234259901406</Filed2>

<Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>

<Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>

<Filed3><Y0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 0090209122637 14586. 42]]></Filed3>

<Filed3><N0820090127S275433861005TBIC20090127 4872.14EDC/212-213-/M000044375340045 20090127151 959 32663.7620090127S278456264276TBIC20090127 5290.45EDC/214-215-/M000044375340045 20090127205840 37954.2120090131S299799314797TBIC20090131 1883.88EDC/216-216-/M000044375340045 20090131104028 39838.0920090202S31532814 662TBIC20090202 3105.37EDC/217-217-/M00004 4375340045 20090202121514 42943.4620090205S337981634779TBIC20090205 2052.20EDC/2 18-218-/M000044375340045 20090205104040 44995.6620090205 M53898 1CNPD20090205 42000.00TO CASH/SELF 20090205111633 12824 2995.6620090207S354072734740TBIC20 090207 4429.21EDC/219-219-/M000044375340045 20090207112958 7424.8720090209S3671 72631419TB Field 126: IC20090209 7161.55EDC/220-221-/M000044375340045 20090209122637 14586. 42]]></Filed3>

</ns0:MT_ISO8583>

Thanks & Regards,

Leela

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

using substring to get values you want, and map to corresponding target nodes except:


   fields3 ->count->Number of statement

Regards.

Liang