You are on page 1of 29

Welcome to the Auto id Generation learning unit in T24.

In this learning unit, you will


learn about how to automatically generate id for each record in an application.

CUS.Auto ID Generation In T24 1


After completing this course, you will be able to

1. Explain the need for Auto ID Generation in T24

2. Understand how it works

3. Set it up for your own applications in T24

CUS.Auto ID Generation In T24 2


Each application in T24 is made up of a number of records. Each record is indentified
uniquely with the help of it’s id. Lets take an example of a customer record. How do
you differentiate one customer from another? You use the record id to identify each
customer uniquely. Now if you had to manually key in the record id each time for a
new customer, it would be difficult for the end user to decide upon an unique id.
Imagine what would happen if there were several users using T24 at the same time.
Its possible that more than one user could decide on the same id for the customer. To
avoid all this confusion T24 provides the facility to generate these id’s automatically

To summarize, Auto ID Generation is introduced in T24

• To reduce the overhead involved in keying in a unique id for each record in each
application.
• And data stored can be accessed easily with the help of a unique id.

CUS.Auto ID Generation In T24 3


Now lets see how to set up Auto ID Generation for an application. As a first step, the
multi value field, PGM AUTOM ID in the COMPANY application is populated. If you
have a new application for which the id is to be generated automatically, then multi
value this field and key in the Application ID. Don’t forget to commit and authorize the
record. By default, you will find several applications for which the id is generated
automatically.

1. ACCOUNT, FUNDS.TRANSFER, FOREX and others have been configured for


Auto ID generation. These applications do not enforce auto id generation. The user
can input an id of his choice or use the id generated by auto id generation. You will
learn later about how to enforce auto id generation.

CUS.Auto ID Generation In T24 4


As a second step, create an entry in another application, AUTO.ID.START for all the
applications that support auto id generation.
Through this application the start point for auto numbering is set up. This is particularly
required where the key of the application file with auto numbering is not a straight
numeric. Key generation can be either the standard type which read and update a
record on the LOCKING file to be able to produce sequential id's or using
UNIQUE.NO that creates an id using a table of characters which is unique enough to
remove the need for a locking update. Records in this application are company
specific. Lets take a look at the fields in this application.

ID: This field identifies the different records maintained on this application.
DESCRIPTION: This field is provided so that the user may load any notes that are
useful about what the record is to be used for.
It can contain upto 35 alphanumeric characters, type 'A'. It is a multivalue field. It is an
optional input.
APPLICATION: This indicates the application for which the start point for auto
numbering is to be loaded.
It can contain upto 32 alphanumeric characters, type 'A'. It is a multivalue field
associated with ID.START. It is a mandatory input.
Must be a valid application with an optional DEPT.ACCT.OFFICER in the format:
APPLICATION-DEPT.ACCT.OFFICER.
The application name must be present on the PGM.FILE with a type of H, U or W.
ID.START: This field is the key of the application file from which auto-numbering is to

CUS.Auto ID Generation In T24 5


start. It can contain upto 35 alphanumeric characters. It is a multivalue field associated with
application. It is a mandatory field.

CUS.Auto ID Generation In T24 5


UNIQUE NO: This field can be ‘YES’ or ‘NULL’. If set to ‘YES’ this will invoke the
generation of transaction id's based on system generated values.
When set ‘YES’, it triggers auto generation of sequences using default characters (1-9
and B-Z - excluding vowels).
Dependent on the use of the BASE.TABLE and ID.LENGTH fields, the sequence
generated will contain alpha, numeric or both in the key, subject to the length allowed.
The system will generate a value based on the criteria set and check if it is used. If
used, it will retry until a unique value is found.
There is no exclusive lock placed on the LOCKING file when the next available
sequence is requested. A record will be written to the LOCKING file with a name like
<application>.UNIQUE .

BASE TABLE: It is used only when UNIQUE.NO is set. It contains a list of characters
that can be used in the building of the unique id. If left blank and UNIQUE.NO is set
the system will use numbers in the range 1-9 and alpha characters in the range B-Z.
Vowels are excluded

ID.LENGTH: It is used in conjunction with UNIQUE.NO to restrict the maximum length


of any generated id.
If settings in UNIQUE.NO and BASE.TABLE are made it may be advisable to restrict
the length of the id to the standard format of 12, 14 or 16 depending on the application.
If left blank the UNIQUE.NO & BASE.TABLE combination may extend the id length to

CUS.Auto ID Generation In T24 6


provide sufficient unique id's.

CUS.Auto ID Generation In T24 6


Lets attempt to automatically generate the id for the CUSTOMER application. You
have already added this application to the record in COMPANY application. Create a
record in the AUTO.ID.START application as illustrated with the ID starting at 100000.
Don’t forget to commit and authorize the record. Note that you have not set the
‘Unique No’ field.

CUS.Auto ID Generation In T24 7


Now that you have created the record for the customer application in
AUTO.ID.START, lets input a customer record and understand what happens.
But before you proceed with that, lets take a quick look at the various ways to input a
new record.

1. As you must be aware of by now, the most frequently used method to input a new
record is to click on the new deal icon when the application is launched. In this
illustration you have launched the CUSTOMER application and a new customer
can be input by clicking the new deal icon.

2. The next method to input a new record is by typing the <Application name>
followed by a space and the function for input- ‘I’ , followed by another space and
the ‘NEW’ in the command line.

3. If you are invoking a version created for the application then a record can be input
by typing <Application,versionname> I NEW in the command line

4. If you are working in a classic mode then type in the application name, then the
function followed by Ctrl+F+Enter. This opens a new record for the application

CUS.Auto ID Generation In T24 8


Going back to the example of automating the ID generation for customer application,
you first take a look at the ID sequence that was last used by looking at the LOCKING
application.

1. A record for the customer application is present in the LOCKING application as


illustrated. From the record you understand that the last id generated for the
customer is 111425. The field CONTENT holds the last id generated for an
application.
2. Now lets understand what happens when you input a customer record using one
of the ways mentioned earlier. The value maintained in the LOCKING application
for the customer is incremented by one and returned as the id for the new record.
Thus 111426 is the new customer’s record id.
3. This information is updated in the LOCKING application as well. The content in
the FBNK.CUSTOMER record now holds the new value, 111426 , the last
generated customer number.

CUS.Auto ID Generation In T24 9


Create auto id generation for the customer application with ids starting from 101.
Check the value updated in the Remark and Content field of the corresponding record
in the locking application.

CUS.Auto ID Generation In T24 10


1. If you look carefully at the record in COMPANY where you entered the
applications for which auto id generation has to be triggered, you will notice that
there are a few applications for which there is no record in AUTO.ID.START but
has an entry in COMPANY. Then how do you suppose the ids are automatically
generated?
2. For instance lets a look at the ID for a Loans and Deposits application. The id has
the format
LD followed by the year in 2 digits and the Julian Date in 3 digits and finally a 5
Digit Sequence Number. The ID is not straight numeric.
3. For such applications the ID generation logic is built into the application itself. The
subroutine EB.FORMAT.ID is invoked to accomplish this.

CUS.Auto ID Generation In T24 11


Lets learn how to enforce auto id generation for an application. Lets take the example
of the CUSTOMER application again. To enforce auto id generation suffix the
application with ‘M’ meaning mandatory. If you do not suffix ‘M’ to your application,
then a record can be input with the id entered by the user as well as it can be
generated automatically.

CUS.Auto ID Generation In T24 12


If you attempt to input a new record with an id of your choice, it shows an error
message. In this illustration, a customer record is input with an id 25252 and it shows
the message “New Record By Autom.Id only”.

CUS.Auto ID Generation In T24 13


Enforce auto id generation only, for ACCOUNT application.

CUS.Auto ID Generation In T24 14


Lets trigger auto id generation for another application namely Funds Transfer.

1. Attach the application to the PGM AUTOM ID field in the COMPANY application
as illustrated.

2. As a second step, a record is created in the AUTO.ID.START application and the


field Unique No is set to ‘YES’.
The field ‘Base Table’ should contain a minimum of 10 characters from which the
unique id is to be formed. It can be numbers entered as ‘123456789’ or can
contain any alphabet excluding vowels. Since the base table is blank in this
illustration, the FT record id will contain both alphabets and numbers generated
randomly.

3. A new record is created in the LOCKING Application with id as


FUNDS.TRANSFER.UNIQUE as shown. This record is used to ascertain the
length of the ID.

CUS.Auto ID Generation In T24 15


Now when you input an FT contract you see that the sequence number part of the id –
6T0CL- is a combination of alphabets and numbers. If the sequence number
generated should contain only numbers or alphabets, use the ‘Base Table’ field to set
it up as explained before.

CUS.Auto ID Generation In T24 16


1. Lets modify the FUNDS.TRANSFER record so that the sequence number starts
with 9001. Remove the check from the unique no field. Don’t forget to commit and
authorize the record

2. The contents of the LOCKING application for FT is illustrated. The last id used in
the generation of FT contracts is 9002. The next sequence number in the
sequence would be 9003.

CUS.Auto ID Generation In T24 17


1. For the FUNDS.TRANSFER application you have not enforced auto id generation
by suffixing the application with ‘M’ while setting it up in the record in the
COMPANY application. So one can input an id to create a new record as well.
Here a new record has been created with the ID containing 90005 as the
sequence number. Is the LOCKING application updated with the id that the user
typed in? No.

2. The contents in the LOCKING application remains unchanged. The LOCKING


application is only updated with the id’s that are generated using any one of the
methods that you learnt before.

CUS.Auto ID Generation In T24 18


If you attempt to generate a record using the new deal icon, it will follow the sequence
present in the LOCKING application. So the sequence number used to create a new
FT contract is 9003. Use of the new deal icon follows the old sequence.

CUS.Auto ID Generation In T24 19


What if the sequence approaches an id that was already generated manually and a
record exists?
The existing record is displayed to the user instead of a new blank record. Lets
understand the same using the FT contract.

1. The last id used in the sequence of auto id generation is 9005. The next id that
should be generated is 9006. But a record has already been input with this id.
2. When you attempt to create a new record by clicking the new deal icon, it opens
the existing FT contract input previously.

CUS.Auto ID Generation In T24 20


1.What if you want to change the sequence of numbers being generated?

2. Do you create a new record in AUTO.ID.START for our application?


2.1 NO

3. You must edit the existing record in AUTO.ID.START

4.When modified and authorized, it changes the LOCKING record accordingly, thus
starting the new sequence

CUS.Auto ID Generation In T24 21


1. What if the sequence number that we follow for all contract based applications isn’t
sufficient for a days transactions?

2. You must remember that the Julian date will change only during COB

3. Sequence number can now contain letters of the English Alphabet (Without A E I O
U) thus giving more ID’s per day in T24

4. Letters to be part of the ID is decided by users using the fields Unique ID, Base
Table, ID Length available in AUTO.ID.START.

5. Not all applications in T24 support this sort of ID generation

CUS.Auto ID Generation In T24 22


As seen earlier, the following has to be setup for generating more ids.

1. ‘Unique No’ field must be set to ‘YES’

2.No Special Characters like ampersand, dollar, hash, asterisk and others are allowed.

3.BASE.TABLE field must have a minimum of 10 digits.

4. Example values for Base Table field are TRSBW12349 , 87631TRNG ,


1234567895 , BCDFGHJKLM , 25DDW1671Y.

5.Zero is included even without having in the Base Table field.

CUS.Auto ID Generation In T24 23


1. An application that supports auto id generation will have its name specified in the
field PGM AUTOM ID in the COMPANY record – True / False
True

2. The FBNK.CUSTOMER record in the LOCKING application holds the list of


customer ids - True / False
False

3. The FUNDS.TRANSFER application has its own built-in id generation logic - True /
False
True

4. To make auto id generation mandatory , specify the application name in the


COMPANY record – True / False
False

5. The characters allowed in the unique id are specified in the BASE.TABLE field of
AUTO.ID.START application - True / False
True

CUS.Auto ID Generation In T24 24


1. Application that supports auto id generation will an entry in the field PGM AUTOM
ID of the COMPANY record

2. Applications that support auto id generation should have an entry in


AUTO.ID.START

3. To make Auto ID generation mandatory, suffix application name with M in the


COMPANY record

4. Last generated id is updated in LOCKING record

5. Letters to be part of the ID can be decided by users using the fields Unique ID,
Base Table, ID Length in AUTO.ID.START

CUS.Auto ID Generation In T24 25


You have learnt about automatic auto id generation for each record in an application.
You will now be able to,

1.Explain the need for Auto ID Generation in T24

2. Understand how it works

3. Set it up for your own applications in T24

CUS.Auto ID Generation In T24 26


CUS.Auto ID Generation In T24 27

You might also like