× Discuss about Archiving, Close of Business, Delivery Setup, Security Management System, Global Processing etc…

IBAN

  • minty_dra
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 5 months ago #9370 by minty_dra
IBAN was created by minty_dra
how to validate IBAN number

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #9374 by durai611
Replied by durai611 on topic Re: IBAN
In ACCOUNT application there is a field ALT.ACCT.ID to provide alternate account number which can be used by the systems outside T24 (In your case IBAN). For validating this alternate account number, need to define the necessary validation rules in ALT.ACCT.PARAMETER application and provide the same in ACCOUNT.PARAMETER field ALTERNATE.ID.

Regards,
Durairaj. N

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
12 years 5 months ago #9375 by jpb
Replied by jpb on topic Re: IBAN
You can use the main logic from following routine, it is called at our site as

CALL FT.CHECK.IBAN(R.NEW(BEN.ACCT.NO)[6,99],Y.CHECK)
IF Y.CHECK <> 1 THEN
IF PGM.VERSION[1,10] NE ",SCHZ.ORD." THEN
TEXT = "Please check! IBAN is not correct"
CALL REM
TEXT = ""
END
END
*-----------------------------------------------------------------------------
* <Rating>-85</Rating>
*-----------------------------------------------------------------------------
      SUBROUTINE FT.CHECK.IBAN(Y.IBAN,Y.CHECK)
*****************************************************************************************

$INSERT I_COMMON
$INSERT I_EQUATE


MAIN:
*====
      Y.LEN             = LEN(Y.IBAN)
      Y.CTRY.CODE       = Y.IBAN[1,2]
      Y.CHECK.DIG.THERE = Y.IBAN[3,2]
      Y.CHECK.DIGIT     = Y.IBAN[Y.LEN,1]
      Y.BBAN            = Y.IBAN[5,Y.LEN-4]

      GOSUB INITIALISE
      GOSUB PROCESS.CHECK

      RETURN

INITIALISE:
*==========
      ALFA = '0A':FM:'1B':FM:'2C':FM:'3D':FM:'4E':FM:'5F':FM:'6G':FM:'7H':FM:'8I':FM:'9J':FM:'K':FM:'L':FM:'M':FM:'N':FM:'O':FM:'P':FM:'Q':FM:'R':FM:'S':FM:'T':FM:'U':FM:'V':FM:'W':FM:'X':FM:'Y':FM:'Z'
      ALFA.A = 'A':FM:'B':FM:'C':FM:'D':FM:'E':FM:'F':FM:'G':FM:'H':FM:'I':FM:'J':FM:'K':FM:'L':FM:'M':FM:'N':FM:'O':FM:'P':FM:'Q':FM:'R':FM:'S':FM:'T':FM:'U':FM:'V':FM:'W':FM:'X':FM:'Y':FM:'Z'
      ALFA.P = '0':FM:'1':FM:'2':FM:'3':FM:'4':FM:'5':FM:'6':FM:'7':FM:'8':FM:'9':FM:'10':FM:'11':FM:'12':FM:'13':FM:'14':FM:'15':FM:'16':FM:'17':FM:'18':FM:'19':FM:'20':FM:'21':FM:'22':FM:'23':FM:'24':FM:'25'
      ALFA.I = '1':FM:'0':FM:'5':FM:'7':FM:'9':FM:'13':FM:'15':FM:'17':FM:'19':FM:'21':FM:'2':FM:'4':FM:'18':FM:'20':FM:'11':FM:'3':FM:'6':FM:'8':FM:'12':FM:'14':FM:'16':FM:'10':FM:'22':FM:'25':FM:'24':FM:'23'
      ALFA.C = '10':FM:'11':FM:'12':FM:'13':FM:'14':FM:'15':FM:'16':FM:'17':FM:'18':FM:'19':FM:'20':FM:'21':FM:'22':FM:'23':FM:'24':FM:'25':FM:'26':FM:'27':FM:'28':FM:'29':FM:'30':FM:'31':FM:'32':FM:'33':FM:'34':FM:'35'

      NEW.ACCT = ''
      TOTAL.WEIGHT = 0

      RETURN
*
PROCESS.CHECK:
*=============
* CHANGE IBAN-FORMAT FROM XX10002300A1023502601
*                      TO 002300A1023502601XX10
      Y.NUMBER  = Y.BBAN:Y.CTRY.CODE:Y.CHECK.DIG.THERE
      LENY.ACCT = LEN(Y.NUMBER)
      Y.CDIG    = Y.NUMBER
      Y.LEN.NB  = LEN(Y.CDIG)

      *Check CHECK DIGIT code
      NEW.STR = ""
      FOR I = 1 TO Y.LEN.NB
      
         Y.CHAR = Y.CDIG[I,1]
         FINDSTR Y.CHAR IN ALFA.A SETTING ALPHA.POS THEN
            NEW.VAL = ALFA.C<ALPHA.POS>
            NEW.STR := NEW.VAL
         END ELSE
            NEW.STR := Y.CHAR
         END

      NEXT I

* split into several division
      Y.CDIG = NEW.STR
      Y.LEN.STR = LEN(NEW.STR)
      Y.PART1 = Y.CDIG[1,9]
      Y.PART2 = Y.CDIG[10,7]
      Y.PART3 = Y.CDIG[17,7]
      Y.PART4 = Y.CDIG[24, Y.LEN.STR-23]

      Y.REST1 = MOD(Y.PART1,97)

      Y.PART2 = Y.REST1:Y.PART2
      Y.REST2 = MOD(Y.PART2,97)

      Y.PART3 = Y.REST2:Y.PART3
      Y.REST3 = MOD(Y.PART3,97)

      Y.PART4 = Y.REST3:Y.PART4
      Y.REST = MOD(Y.PART4,97)  

* if the rest is equal to 1 means the IBAN has a correct Control Number
      Y.CHECK = Y.REST

      RETURN
*
*=====
   END

Please Log in or Create an account to join the conversation.

  • minty_dra
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 5 months ago #9401 by minty_dra
Replied by minty_dra on topic Re: IBAN
Thanks a lot your routine worked for me.................can u brief me the procedure/steps done in routine it will good for me.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
12 years 5 months ago #9408 by jpb
Replied by jpb on topic Re: IBAN
Hi Mohan,

although there are some unneeded lines in the routine (it was in a process of try and error ;-) the main logic is developed from the description in en.wikipedia.org/wiki/International_Bank...ng_IBAN_check_digits.

The logic for mod-97 calculation is flexible, you'll find explanations on the web.

Unneeded:
Y.CHECK.DIGIT = Y.IBAN[Y.LEN,1]
ALFA = '0A...
ALFA.P ...
ALFA.I ...
LENY.ACCT = LEN(Y.NUMBER)

Improvement:
As I'm not sure there are only capital letters used in IBAN, the line
FINDSTR Y.CHAR IN ALFA.A SETTING ALPHA.POS THEN
could be changed to
FINDSTR UPCASE(Y.CHAR) IN ALFA.A SETTING ALPHA.POS THEN
to be on the save side.
The following user(s) said Thank You: armin

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #12160 by stahir65
Replied by stahir65 on topic IBAN
Dear Friends

I have the same issue to assigned IBAN account id as an alternate account id. first I have created a new alternate account id in ALT.ACCT.PARAMETER table as 'IBAN' following fields added
I am from pakistan

Step# 1

File Name: ALT.ACCT.PARAMETER

GB description : INTL BANK ACCOUNT NUMBER
Description: IBAN
Max Length: 16
Min Length:
Acct No Type: A
Display Mask: #####-###############

Step#2

File Name: ACCOUNT.PARAMETER

23.1 ALTERNATE.ID: LEGACY (Already Exist for PIBAS A/cs)
23.2 ALTERNATE.ID: IBAN (New One for IBAN)

For Pakistan we will use 24 digit IBAN number i.e PK47XBBB00000000012345678
let suppose our normal account number is 12345678, for IBAN it will be PK47XBBB00000000012345678
PK = Country code
47 = Bank Code
XBBB= Bank Name
00000000012345678 = Account Number (16 digits)

when I will open a new account 12345678 from ACCOUNT application and try to assign new IBAN number in ALT.ACCT.ID field where defined IBAN for ALT.ACCT.ID system did not allowed to input the IBAN Account number (PK47XBBB00000000012345678) Error To Many Character if I input 16 digits it will accept but do not save it

please help me where I am wrong and what i have to do it

Thanks

Syed Tahir

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 9 months ago #12162 by jpb
Replied by jpb on topic IBAN
Set the length to the complete IBAN, i.e. 24 in your case (or use 35 to be on the save side for future usage in other countries).

When you see two input fields for ALT.ACCT.ID, one with TYPE LEGACY and one with IBAN it should be OK to use them.
The IBAN should be present in ACCOUNT and in ALTERNATE.ACCOUNT.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #12177 by stahir65
Replied by stahir65 on topic IBAN
Dear friend,

I am input new account number which is not contain old legacy number but new IBAN number, I am trying both way to input only IBAN number and save system give me error Too Many Character, EITHER I will input both ALT.ACCT.ID as IBAN

Thanks



Syed Tahir
Last edit: 11 years 8 months ago by stahir65. Reason: ATTACHMENT

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 8 months ago #12178 by jpb
Replied by jpb on topic IBAN
We also have two alternate numbers and it works OK to input one or the other







Attachments:

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #12181 by stahir65
Replied by stahir65 on topic IBAN
I attched the error file, I did the same, when i want to save the account application it says "Multiple keys Assigned to the alternate Key Field: ALT.ACCT.ID" when i clicked it will not save

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 8 months ago #12186 by jpb
Replied by jpb on topic IBAN
Your attachment is missing. Scroll to the top of page after attaching something, there the error will be shown (normally it's either size or filetype :-)

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #12189 by stahir65
Replied by stahir65 on topic IBAN
Which version of Globus/T24 you are using. mine is R7.004 and it is not allowing me to save multiple Alternate Account numbers.

EB.ALTERNATE.KEY

ALT.KEY.FIELD: ALT.ACCT.ID
CONTACT.TYPE: SYSTEM
ACCESS.METHOD: READ
UNIQUE: SYSTEM

THE GIVEN BELOW DETAIL OF MY EB.ALTERNATE.KEY
Last edit: 11 years 8 months ago by stahir65. Reason: ADD TEXT

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #12191 by durai611
Replied by durai611 on topic IBAN
Have you created EB.OBJECT record for ACCOUNT application?

Normally system allows to give only 16 digits of account number. To allow more than that you have to create a record in EB.OBJECT as show below

OBJECT.ID......... ACCOUNT
1. 1 GB DESCRIPTION. Standard length for Account Number
2 MAX.LENGTH........ 35

After creating this record, follow the steps as suggested by jpb.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 8 months ago #12192 by jpb
Replied by jpb on topic IBAN
Check if you have a record in EB.ALTERNATE.KEY for the application ACCOUNT.

I think it has to be deleted if you use ALTERNATE.ACCOUNT . . .

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago - 11 years 8 months ago #12193 by stahir65
Replied by stahir65 on topic IBAN
I have already changed the EB.OBJECT 16 to 24
Attachments:
Last edit: 11 years 8 months ago by stahir65. Reason: setup

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 8 months ago #12195 by jpb
Replied by jpb on topic IBAN
EB.ALTERNATE.KEY ?

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #12196 by durai611
Replied by durai611 on topic IBAN
From the error "Multiple keys Assigned to the alternate Key Field: ALT.ACCT.ID", I understood that you have defined field ALT.ACCT.ID as the alternate key for account in application EB.ALTERNATE.KEY.

You can define a multivalue field as alternate key, but it should not hold multiple values.
In your case, ALT.ACCT.ID field already holds value for 23.1 ALTERNATE.ID: LEGACY (Already Exist for PIBAS A/cs) and now you are trying to provide value for 23.2 ALTERNATE.ID: IBAN (New One for IBAN).

Do you really want EB.ALTERNATE.KEY for ACCOUNT application because you have already defined ALT.ACCT.PARAMETER?

I think you might have got confused with EB.ALTERNATE.KEY and ALT.ACCT.PARAMETER.

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #12197 by stahir65
Replied by stahir65 on topic IBAN (EB.ALTERNATE.KEY)
EB.ALTERNATE.KEY

ALT.KEY.FIELD: ALT.ACCT.ID
CONTACT.TYPE: SYSTEM
ACCESS.METHOD: READ
UNIQUE: SYSTEM

THE GIVEN BELOW DETAIL OF MY EB.ALTERNATE.KEY

Please Log in or Create an account to join the conversation.

More
11 years 8 months ago #12198 by stahir65
Replied by stahir65 on topic IBAN
IBAN setup Attachment files.


















Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • TAFj-R20 - 'unix'
More
11 years 8 months ago - 11 years 8 months ago #12199 by jpb
Replied by jpb on topic IBAN
As stated before - reverse the ACCOUNT record in EB.ALTERNATE.KEY ! It's not needed but restricts ALT.ACCT.ID as defined in ACCOUNT.PARAMETER (and also restricts it to have only 16 digits).

I suppose this record is quite old, from the installation of Globus (before 1999) ??
Last edit: 11 years 8 months ago by jpb.

Please Log in or Create an account to join the conversation.

Time to create page: 0.412 seconds