TEMENOS T24
DAS Guide
User Guide
Amendment History:
Revision
Date Amended
Name
Description
Draft
Dec 2006
Tony Porter
Initial version
1.0
Feb 2007
Tony Porter
DAS 2.0 Update
1.1
Mar 2007
Tony Porter
Optional fields
1.2
July 2007
Tony Porter
More notes and examples
No part of this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of TEMENOS Holdings NV.
Copyright 2005 TEMENOS Holdings NV. All rights reserved.
DAS Guide
Table of Contents
Introduction......................................................................................................................................... 3
DAS routines....................................................................................................................................... 4
DAS................................................................................................................................................. 4
@[Link] ([Link])............................................................................................. 5
DAS Inserts......................................................................................................................................... 6
I_DAS.............................................................................................................................................. 6
I_DAS.tablename............................................................................................................................ 7
I_DAS.[Link].................................................................................................................. 7
Adding DAS to existing code............................................................................................................... 8
Analysis........................................................................................................................................... 8
Creating DAS files........................................................................................................................... 8
Defining Queries................................................................................................................................. 9
Defining and using optional fields.................................................................................................... 9
Brackets.......................................................................................................................................... 9
Brackets and optional fields............................................................................................................. 9
Side notes......................................................................................................................................... 10
Use an alternative table................................................................................................................. 10
Passing multiple data items........................................................................................................... 10
Caching......................................................................................................................................... 10
Using . In a wildcard..................................................................................................................... 10
Examples.......................................................................................................................................... 11
DAS............................................................................................................................................... 11
TEMENOS T24 User Guide
Page 2 of 12
DAS Guide
Introduction
The purpose of this document is to give an overview of the DAS routines and Inserts. Examples are
included where possible.
There is also a section showing what is required to add DAS to existing code.
TEMENOS T24 User Guide
Page 3 of 12
DAS Guide
DAS routines
DAS
Use this routine to process DAS queries.
Parameters
Table name, Query list number , {Arguments}, {table suffix | .DISPLAY}
Details
This routine will return a query list based on the query list number and table name supplied.
Calls @[Link] ([Link]) which does all the processing required to return the list of
keys.
Previous Version of DAS
Pass DISCOVER as the query list number to return the query string (calls @[Link]
with .DISPLAY as table suffix and passes its own ARG list) in the table suffix.
If the query list does not exist, UNKNOWN QUERY is returned back in the query list number.
Current Version of DAS
Passing DISCOVER will not work at this point, as the code has been removed from I_DAS routines,
use dasMode = dasReturnDescription before calling.
Example 1
The following code processes a DAS query and returns the results.
[Link]
[Link]
ARGUMENTS
[Link]
dasMode
=
=
=
=
=
[Link]
dasScPosAssetWorkHisIdEndsById
TUESDAY
; * e.g. $HIS
dasReturnResults
CALL DAS([Link], [Link], ARGUMENTS, [Link])
LOOP
REMOVE [Link] FROM [Link] SETTING [Link]
WHILE [Link]:[Link] DO
CRT RESULT FROM QUERY : : [Link]
REPEAT
TEMENOS T24 User Guide
Page 4 of 12
DAS Guide
@[Link] ([Link])
Implements the query definition for all queries that can be used against the table. Used and called by
DAS routine - these routines should only be created from a template.
Parameters
Query list number , {Arguments}, {table suffix}
Details
This is created from a template.
This routine would not usually be called by code outside of a CALL DAS. If you want to return the
query string that DAS builds, set dasMode=dasReturnDescription and the select statement is
returned, along with the description, of the query string in the `Query list number` parameter.
If you want to include a wildcard in your query, use dasWildcard and not . For example
[Link]<1> : dasWildcard.
The DAS routine MUST include the following internal routine:
[Link]:
This will include a case block using a selection of the following options
[Link]
[Link]
[Link]
[Link]
[Link]
* E.G. `BY-DSND @ID
[Link]
[Link] = 0(default) or 1
An example of a simple CASE statement:
CASE [Link] = dasScEntWorkIdEquals ; * All DIARY except drips price
[Link]
= '@ID'
[Link] = 'EQ'
[Link]
= [Link]<1>
An example of a field join CASE statement :
CASE [Link] = dasScFeeGroupProrataEqual ; * Prorata/Equal payment fee groups
[Link]
= 'PAYMENT' : FM : 'PAYMENT'
[Link] = 'EQ' : FM : 'EQ'
[Link]
= 'PRORATA' : FM : 'EQUAL'
[Link]
= 'OR'
Example
The following code displays the query string for a given query.
QUERY
= dasScPosAssetWorkHisIdEndsById
ARGUMENTS = TUESDAY
DasMode
= dasReturnDescription
CALL [Link](QUERY,ARGUMENTS, [Link])
CRT QUERY TO EXECUTE : : QUERY<1>
CRT DAS Description : : QUERY<2>
dasMode = dasReturnResults
TEMENOS T24 User Guide
Page 5 of 12
DAS Guide
DAS Inserts
I_DAS
Common code for all Data Access Service routines (used internally by DAS only).
Details
Sets up the dasAllIds / DAS$[Link] equate to [Link] by including I_DAS.COMMON.
This include contains the code that is executed in all @[Link] ([Link]) routines.
It first checks the cache, if not found in the cache it calls the internal @[Link] [Link]
routine, then executes its internal [Link] routine which invokes the external
[Link] routine.
If there is an error, the error is returned back in the query list.
If adding to the cache, the results are stored in DAS$CACHE(javafullname equate number+1). If
caching dasAllIds then DAS$CACHE(1) is used.
Includes the following internal routines:
INITIALISE
[Link]
[Link]
[Link]
Used in routines
@[Link] ([Link])
TEMENOS T24 User Guide
Page 6 of 12
DAS Guide
I_DAS.tablename
Defines the named queries that can be run against a table, this file must exist for a DAS query.
Details
Each named query must be setup as a CASE statement in @[Link] ([Link]).
The named query must be defined in lowercase starting with das, then each word starting with an
uppercase character.
The equate number must start from 1 and increment in steps of 1. You can not use 0 as this would
interfere with the DAS$CACHE used by dasAllIds.
These includes are created from a template with a comment block preceding the equates.
If your DAS item has no named queries (only requires dasAllIds) then this MUST exist without
any equate assignments.
Example
*----------------------------------------------------------------------------* Insert for [Link] Data Access Service.
* ---------------------------------------------------------------------------* Defines the named queries that can be issued against [Link] table.
* For the implementation of these queries, refer to [Link]
*----------------------------------------------------------------------------EQU dasScPosAssetWorkIdEndsById TO 1
EQU dasScPosAssetWorkIdBeginsById TO 2
I_DAS.[Link]
Defines the description for each named query, this file must exist for each DAS query.
Details
These includes are created from a template with a comment block preceding the array.
If your DAS item has no named queries (only requires dasAllIds) then this MUST exist without
any DAS$NOTES assignments.
Example
*----------------------------------------------------------------------------* Insert for [Link] Data Access Service.
*----------------------------------------------------------------------------* Defines the named queries that can be issued against the [Link]
* table.
* For the implementation of these queries, refer to [Link]
*----------------------------------------------------------------------------* You MUST have a dimensioned array for DAS$CACHE and DAS$NOTES
*----------------------------------------------------------------------------COMMON/[Link]/DAS$CACHE(100),DAS$NOTES(100)
*----------------------------------------------------------------------------DAS$NOTES(dasScPosAssetWorkIdEndsById) = 'Records with ID ending in value, by ID'
TEMENOS T24 User Guide
Page 7 of 12
DAS Guide
Adding DAS to existing code.
Analysis
You will need to do the following.
Find the SELECT to replace in the code
Note the Table Name
Search PVCS to see if DAS routines already exist, if it does check to see if an existing query
fits your needs. Never amend an existing query unless there is a bug in the query as existing
code can break, it could even rely on the data sent back from the incorrect query.
(If necessary) Create a DAS java style variable name reflecting the purpose of the SELECT if
a new query is to be created.
Creating DAS files
Create the base DAS items to support the SELECT replacement if none exist in PVCS, otherwise
youll need to amend the PVCS items.
1. Create the I_DAS.tablename item, for example I_DAS.[Link] using the I_DAS.XXX
template.
2. Create the I_DAS.[Link] item, for example I_DAS.[Link] using
the I_DAS.[Link] template.
3. Create the [Link] item, for example [Link] using the I_DAS.XXX
template.
4. Add your SELECT logic to the CASE statement in [Link].
TEMENOS T24 User Guide
Page 8 of 12
DAS Guide
Defining Queries
Defining and using optional fields
To make a field optional :
[Link]<n> = dasIsAnOptionalField
In your code where you call the DAS routine, if you dont want to include it in the DAS routine..
[Link]<n> = dasDoNotUseThisOptionalField
Please note that a field must of already been marked as dasIsAnOptionalField in the DAS
query, otherwise dasDoNotUseThisOptionalField will be ignored. This is to ensure that the logic
behind the query is not broken (joins etc).
Brackets
DAS can handle brackets (and will warn you if there is a mismatch on closing or opening brackets), to
include a bracket just prefix it to the field and suffix toe closing bracket to the data.
[Link]<1> = '(FIELD.A'
[Link]<2> = 'FIELD.B'
Then suffix ) on the last data field
[Link]<1> = [Link]<1>
[Link]<2> = [Link]<2> : ')'
Will construct the string similar to
SELECT [Link] WITH (FIELD.A EQ '' AND FIELD.B LT '')
Brackets and optional fields
When using brackets and optional fields, care must be taken on how any ignored fields will effect the
logic of the joins in the resulting SELECT statement.
DAS can handle simple brackets and optional fields
(X1 OR X2 OR X3) AND X4 AND X5
If all the above were optional, the brackets would be inserted correctly as required for any
combination.
((X1 OR X2) AND (X3 OR X4)) AND X5
If X3 was not used then X4 would use OR to join, (X1 OR X2) OR X4, this is because DAS uses the
previous fields join.
TEMENOS T24 User Guide
Page 9 of 12
DAS Guide
Side notes
Use an alternative table
[Link]<2> = [Link]
(A DAS program name which reflects the functionality should be used in the DAS routine)
Passing multiple data items
The feature exists in [Link] where you can pass a string of data to emulate SELECT
file WITH field = ARG1 ARG2 ARG3.
[Link] = ARG1 : @VM : ARG2 : @VM : ARG3
Caching
If [Link], [Link], [Link], [Link], [Link] or [Link] contain data, no
caching will be performed.
Using . In a wildcard
If you are required to pass a . before a wildcard, just include it in the arg for example.
[Link] = 123.
CALL DAS
In DAS.
[Link]=[Link]<1> : dasWildcard
Will produce SELECT file WITH field LIKE '123'.... the query will run with the last 3 dots
as the wildcard.
TEMENOS T24 User Guide
Page 10 of 12
DAS Guide
Examples
DAS
Example 1. A minimal DAS item that only processes dasAllIds, areas highlighted would need to be
amended for your DAS item. Remember you will need I_DAS.tablename and
I_DAS.[Link] created from the template.
SUBROUTINE [Link]([Link], [Link], [Link])
*----------------------------------------------------------------------------* DAS for RELATION
*----------------------------------------------------------------------------$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_DAS.RELATION
$INSERT I_DAS.[Link]
$INSERT I_DAS
*----------------------------------------------------------------------------*** <region name= [Link]>
[Link]:
***
BEGIN CASE
CASE [Link] = dasAllIds
;* Standard to return all keys
CASE OTHERWISE
[Link] = '[Link]'
END CASE
RETURN
*** </region>
*-----------------------------------------------------------------------------
Example 2. A simple query has been added (defined in I_DAS.tablename AND
I_DAS.[Link]) to the above code as highlighted below. Note the order of the variables
which makes it easier to read.
SUBROUTINE [Link]([Link], [Link], [Link])
*----------------------------------------------------------------------------* DAS for RELATION
*----------------------------------------------------------------------------$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_DAS.RELATION
$INSERT I_DAS.[Link]
$INSERT I_DAS
*----------------------------------------------------------------------------*** <region name= [Link]>
[Link]:
***
BEGIN CASE
CASE [Link] = dasAllIds
CASE [Link]
[Link]
[Link]
[Link]
=
=
=
=
;* Standard to return all keys
dasRelationReverseRelation ;* ReverseRelation as specified
"[Link]"
"EQ"
[Link]<1>
CASE OTHERWISE
[Link] = '[Link]'
END CASE
RETURN
*** </region>
*-----------------------------------------------------------------------------
TEMENOS T24 User Guide
Page 11 of 12
DAS Guide
Example 3. Another query has been added that checks two fields to the above code as highlighted
below.
* Ensure that you have [Link] when you have 2 or more fields.
* Remember to add the query name to I_DAS.tablename and I_DAS.[Link].
SUBROUTINE [Link]([Link], [Link], [Link])
*----------------------------------------------------------------------------* DAS for RELATION
*----------------------------------------------------------------------------$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_DAS.RELATION
$INSERT I_DAS.[Link]
$INSERT I_DAS
*----------------------------------------------------------------------------*** <region name= [Link]>
[Link]:
***
BEGIN CASE
CASE [Link] = dasAllIds
;* Standard to return all keys
CASE [Link] = dasRelationReverseRelation ;* Reverse Relation as specified
[Link]
= "[Link]"
[Link] = "EQ"
[Link]
= [Link]<1>
CASE [Link] = dasRelationReverseRelationIdNe ;* Reverse Relation as specified, ID <>
specified
[Link]
= "[Link]" : FM : "@ID"
[Link] = "EQ" : FM : "NE"
[Link]
= [Link]<1> : FM : [Link]<2>
[Link]
= "AND"
CASE OTHERWISE
[Link] = '[Link]'
END CASE
RETURN
*** </region>
*-----------------------------------------------------------------------------
TEMENOS T24 User Guide
Page 12 of 12