×
Discuss about OFS, Temenos Connectors, Various OFS modes, OFS with Versions, OFS performance, Logging, EB.PHANTOM, OFS.SOURCE etc…
Reading multiple TAG values from SWIFT INWARD MSG
- Rizwan1973
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
13 years 6 months ago #7681
by Rizwan1973
Reading multiple TAG values from SWIFT INWARD MSG was created by Rizwan1973
Find part of inward SWIFT message
:32B:GBP1042,
:57A:ABCBANK
:33B:USD1568,
:53A:YESBANK
:57A:XYZBANK
-}{5:{CHK:EE30BE29DEE8}}{S:{COP:P}}
Find part of DE.FORMAT.SWIFT record (concentrate on TAG57A)
3.22 FIELD TAG...... 57A
4.22 FIELD NAME..... ACCT WITH C/D
5.22. 1 CONVERSION.. /
7.22 MULTIPLES...... NO
8.22 INWARD ROUTINE. NO
9.22 OUTWARD ROUTINE NO
3.23 FIELD TAG......
4.23 FIELD NAME..... ACCT WITH BANK ACC
5.23. 1 CONVERSION.. ACC
7.23 MULTIPLES...... NO
8.23 INWARD ROUTINE. NO
9.23 OUTWARD ROUTINE NO
3.24 FIELD TAG......
4.24 FIELD NAME.....ACCT WITH BANK CUS
5.24. 1 CONVERSION.. CUS
7.24 MULTIPLES...... NO
8.24 INWARD ROUTINE. NO
9.24 OUTWARD ROUTINE NO
My issue is while reading TAG57A, system is reading first value only which is ABCBANK but it is not capturing XYZBANK which is the other value. How can we capture and process it. Can anybody help me?
FYI, with same DE.FORMAT.SWIFT the outward message is perfect.
Thanks
:32B:GBP1042,
:57A:ABCBANK
:33B:USD1568,
:53A:YESBANK
:57A:XYZBANK
-}{5:{CHK:EE30BE29DEE8}}{S:{COP:P}}
Find part of DE.FORMAT.SWIFT record (concentrate on TAG57A)
3.22 FIELD TAG...... 57A
4.22 FIELD NAME..... ACCT WITH C/D
5.22. 1 CONVERSION.. /
7.22 MULTIPLES...... NO
8.22 INWARD ROUTINE. NO
9.22 OUTWARD ROUTINE NO
3.23 FIELD TAG......
4.23 FIELD NAME..... ACCT WITH BANK ACC
5.23. 1 CONVERSION.. ACC
7.23 MULTIPLES...... NO
8.23 INWARD ROUTINE. NO
9.23 OUTWARD ROUTINE NO
3.24 FIELD TAG......
4.24 FIELD NAME.....ACCT WITH BANK CUS
5.24. 1 CONVERSION.. CUS
7.24 MULTIPLES...... NO
8.24 INWARD ROUTINE. NO
9.24 OUTWARD ROUTINE NO
My issue is while reading TAG57A, system is reading first value only which is ABCBANK but it is not capturing XYZBANK which is the other value. How can we capture and process it. Can anybody help me?
FYI, with same DE.FORMAT.SWIFT the outward message is perfect.
Thanks
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
Less
More
- Posts: 2859
- Thank you received: 649
13 years 6 months ago #7683
by jpb
Replied by jpb on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
Talking about MT600 ??
No matter which MT, I think you have to create your own DE.I.TAG57 routine which checks if the first TAG-57 is already processed (= present in OFS.DATA) and then continues with the second (by searching in DE.I.FIELD.DATA).
the routine is to be applied in DE.I.SUBROUTINE.TABLE - record 57
No matter which MT, I think you have to create your own DE.I.TAG57 routine which checks if the first TAG-57 is already processed (= present in OFS.DATA) and then continues with the second (by searching in DE.I.FIELD.DATA).
the routine is to be applied in DE.I.SUBROUTINE.TABLE - record 57
Please Log in or Create an account to join the conversation.
- Rizwan1973
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
13 years 6 months ago #7684
by Rizwan1973
Replied by Rizwan1973 on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
Thanks for the info..
I check there exist already a tag routine for TAG57 in DE.I.SUBROUTINE.TABLE, but no source is available for that. Is it advisable to override this routine, if yes could you please pass me any sample surboutine for such case..
Thanks
I check there exist already a tag routine for TAG57 in DE.I.SUBROUTINE.TABLE, but no source is available for that. Is it advisable to override this routine, if yes could you please pass me any sample surboutine for such case..
Thanks
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
Less
More
- Posts: 2859
- Thank you received: 649
13 years 6 months ago #7686
by jpb
Replied by jpb on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
The source (at least an basic version) should reside in T24.BP or GLOBUS.BP.
Nevertheless you shouldn't override but place a "own" routine.
If you don't have it i can provide what we've got in R08.
Nevertheless you shouldn't override but place a "own" routine.
If you don't have it i can provide what we've got in R08.
Please Log in or Create an account to join the conversation.
- Rizwan1973
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
13 years 6 months ago #7689
by Rizwan1973
Replied by Rizwan1973 on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
JPB,
Very kind of you,
I would appreciate emailing me the TAG routine we are discussing about.
Kindly send it to This email address is being protected from spambots. You need JavaScript enabled to view it.
Many Thanks
Riz.
Very kind of you,
I would appreciate emailing me the TAG routine we are discussing about.
Kindly send it to This email address is being protected from spambots. You need JavaScript enabled to view it.
Many Thanks
Riz.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
Less
More
- Posts: 2859
- Thank you received: 649
13 years 6 months ago #7691
by jpb
Replied by jpb on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
As there is nothing secret behind, here it is :
Good luck
jpb
SUBROUTINE DE.I.TAG57(TAG,INSTITUTION,OFS.DATA,CUSTOMER,CCY,SPARE3,SPARE4,DE.I.FIELD.DATA,TAG.ERR)
*-----------------------------------------------------------------------------
* <Rating>-103</Rating>
***********************************************************************************************
*
* This routine assigns SWIFT tag57 - Account with Institution to the ofs message being
* build up via inward delivery
* translate the raw data into OFS format and written away to the ofs directory specified
*
* Inward
* Tag - The swift tag either 57A,57B or 57D
* Intermediary - The swift data
*
* Outward
* OFS.DATA - The corresponding application field in OFS format
* DE.I.FIELD.DATA - Field name : TM: field values separated by VM
* TAG.ERR - Tag error.
*
************************************************************************************
*
* MODIFICATIONS
* ---------------
*
* 24/07/02 - EN_10000786
* New Program
*
* 07/10/02 - EN_10001322
* Account Fields for SWIFT 2002 Usage
*
* 19/12/02 - CI_10005670
* // may be clearing codes and hence if // is present
* it should not be treated as account numbers.
*
* 28/01/04 - CI_10016936
* While mapping the Account field data to OFS.DATA, use the
* syntax ACCOUNT field name :1= Account field data content
*
* 09/06/04 - CI_10020477
* 103 error tag 57B
*
* 30/06/04 - BG_100006876
* Support tag 57C for MT102.
*
* 22/02/07 - BG_100013037
* CODE.REVIEW changes.
*
************************************************************************************
*
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.FUNDS.TRANSFER
*
GOSUB INITIALISE
IF TAG.ERR THEN
RETURN ;* BG_100013037 - S
END ;* BG_100013037 - E
GOSUB GET.ACCT.WITH.BANK.ACCT
*
BEGIN CASE
CASE TAG = '57A'
CALL DE.SWIFT.BIC(INSTITUTION,ID.COMPANY,CUSTOMER.NO)
IF CUSTOMER.NO = '' THEN
CUSTOMER.NO = PREFIX:INSTITUTION
END
OFS.DATA := FIELD.NAME :'=' : CUSTOMER.NO
DE.I.FIELD.DATA<1> = '"':FIELD.NAME:'"':CHARX(251):CUSTOMER.NO ;* EN_10001322 - S/E
CASE TAG = '57B'
OFS.DATA := FIELD.NAME: ':1:1=' :'"': INSTITUTION:'"' ;* CI_10020477 S/E
DE.I.FIELD.DATA<1> = '"':FIELD.NAME:'"':CHARX(251):INSTITUTION ;* EN_10001322 - S/E
*
* EN_10001322 - S
*
CASE TAG = '57C'
OFS.DATA := FIELD.NAME: ':1:1=' :'"': INSTITUTION:'"' ;* BG_100006876 S/E
*
* EN_10001322 - E
*
CASE TAG = '57D'
*
GOSUB PROCESS.TAG.57D ;* BG_100013037 - S / E
*
CASE 1
* If the acct with bank present is a globus customer, then default the
* customer's nostro account.
* TAG.ERR = 'FIELD NOT MAPPED FOR TAG -':TAG
CUSTOMER.NO = CUSTOMER
TXN.TYPE = ''
ACCOUNT = ''
ACCOUNT.CATEGORY = ''
ACCOUNT.COUNT = ''
ACCOUNT.CLASS = ''
ACCOUNT.ERROR = ''
ACCOUNT.IN = ''
CALL DE.I.GET.ACCT.NO( CUSTOMER.NO, CCY, TXN.TYPE, ACCOUNT.IN, ACCOUNT, ACCOUNT.CATEGORY, ACCOUNT.COUNT,ACCOUNT.CLASS, ACCOUNT.ERROR)
* Find the customer's NOSTRO and check that there is only one
LOCATE 'NOSTRO' IN ACCOUNT.CLASS<1> SETTING POS THEN
IF ACCOUNT.COUNT<POS> GT 1 THEN
TAG.ERR = 'ERROR - MORE THAN ONE ACCOUNT AVAILABLE'
ACCOUNT.NO = ''
END ELSE
ACCOUNT.NO = ACCOUNT<POS,1>
END
END
IF ACCOUNT.NO THEN
OFS.DATA = OFS.DATA :'CREDIT.ACCT.NO=':ACCOUNT.NO
END
*
END CASE
*
RETURN
*
************************************************************************************
INITIALISE:
************************************************************************************
*
ETEXT = ''
CUSTOMER.NO = ''
PREFIX = ''
CRLF = CHARX(013):CHARX(010)
OFS.DATA = ''
LEN.CRLF = LEN(CRLF)
LEN.INSTITUTION = LEN(INSTITUTION)
TAG.ERR = ''
FIELD.DATA = ''
ACCOUNT.NO = ''
DE.I.FIELD.DATA = ''
INST.ACCT.DATA = ''
*
BEGIN CASE
*
CASE APPLICATION = 'FUNDS.TRANSFER'
FIELD.NAME = 'ACCT.WITH.BK'
ACCNT.FLD = 'IN.ACCT.BANK.ACC' ;* EN_10001322 - S/E
PREFIX = 'SW-'
*
CASE 1
*
TAG.ERR = 'APPLICATION MISSING FOR TAG - ':TAG
END CASE
*
RETURN
************************************************************************
GET.ACCT.WITH.BANK.ACCT:
************************************************************************
IF INDEX(INSTITUTION,'/',1) THEN
CRLF.POS = INDEX(INSTITUTION,CRLF,1)
* CI_10005670 S
* If the first 2 characters are // , then it may be the clearing code
* bit of the party identifier. Hence ignore the clearing code part and
* the rest of the content should be mapped to bank details
*
* If the frist 3 characters are /C/ or /D/, then it indicates the debit
* or credit identifier and it can be followed by account number.
* In this case get the account number between the 2nd / and first crlf.
* The rest of the content is bank details
*
* If the first character is / and CRLF is found, then the account number
* may be present between the / and CRLF.
* The rest of the content is bank details.
*
* If none of the above is met, then the entire tag is assumed to be for
* bank details only.
BEGIN CASE
CASE INSTITUTION[1,2] = '//'
INSTITUTION= INSTITUTION[CRLF.POS+LEN.CRLF,LEN.INSTITUTION]
CASE INSTITUTION[1,3] MATCHES '/C/':VM:'/D/'
SLASH = INDEX(INSTITUTION,'/',2)
INST.ACCT.DATA = INSTITUTION[SLASH+1,CRLF.POS-(SLASH+1)]
INSTITUTION= INSTITUTION[CRLF.POS+LEN.CRLF,LEN.INSTITUTION]
CASE INSTITUTION[1,1] = '/' AND CRLF.POS
SLASH = INDEX(INSTITUTION,'/',1)
INST.ACCT.DATA = INSTITUTION[SLASH+1,CRLF.POS-(SLASH+1)]
INSTITUTION= INSTITUTION[CRLF.POS+LEN.CRLF,LEN.INSTITUTION]
END CASE
* CI_10005670 E
OFS.DATA := ACCNT.FLD :':1=': INST.ACCT.DATA:',' ;* CI_10016936 S/E
DE.I.FIELD.DATA<2> ='"':ACCNT.FLD:'"':CHARX(251):INST.ACCT.DATA
END
RETURN
****************************************************************************************
* BG_100013037 - S
*===============
PROCESS.TAG.57D:
*===============
CONVERT CRLF TO VM IN INSTITUTION
NO.CRLF = DCOUNT(INSTITUTION,VM)
FOR C.CRLF = 1 TO NO.CRLF
FIELD.DATA = INSTITUTION<1,C.CRLF>
FIELD.DATA = QUOTE(FIELD.DATA)
IF C.CRLF = NO.CRLF THEN
COMMA.SEP = '' ;*BG_100013043 - S
END ELSE
COMMA.SEP = ','
END ;*BG_100013043 - E
OFS.DATA = OFS.DATA : FIELD.NAME : ':':C.CRLF:'=':FIELD.DATA :COMMA.SEP
NEXT C.CRLF
DE.I.FIELD.DATA<1> ='"':FIELD.NAME:'"':CHARX(251):INSTITUTION ;* EN_10001322 - s/e
RETURN ;* BG_100013037 - E
****************************************************************************************
END
*
Good luck
jpb
Please Log in or Create an account to join the conversation.
- Rizwan1973
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
13 years 6 months ago #7729
by Rizwan1973
Replied by Rizwan1973 on topic Re: Reading multiple TAG values from SWIFT INWARD MSG
Hi JPB
Thanks.
We dont have TCSERVER, alternatively I am uploading the SWIFT message thru tSS TELNET, the system successfully takes it.
I have put the DEBUG in the TAG 57 routine,to understand the flow and values of certain fields, but tSS upload does not triggering this routine, can you pl. tell me how can we DEBUG this routine?
Regards
Thanks.
We dont have TCSERVER, alternatively I am uploading the SWIFT message thru tSS TELNET, the system successfully takes it.
I have put the DEBUG in the TAG 57 routine,to understand the flow and values of certain fields, but tSS upload does not triggering this routine, can you pl. tell me how can we DEBUG this routine?
Regards
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds