0% found this document useful (0 votes)
14 views10 pages

T24 APIs Programming Workshop Guide

Uploaded by

Gedefaye Anteneh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views10 pages

T24 APIs Programming Workshop Guide

Uploaded by

Gedefaye Anteneh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Information in this document is subject to change without notice.

No part of this document may be reproduced or transmitted in any form or by any means, for any purpose,
without the express written permission of TEMENOS HEADQUARTERS SA.

COPYRIGHT 2007 - 2008 TEMENOS HEADQUARTERS SA. All rights reserved.


PRG1-Programming using T24 APIs
Workshop

Information in this document is subject to change without notice.

No part of this document may be reproduced or transmitted in any form or by any means, for any purpose,
without the express written permission of TEMENOS HEADQUARTERS SA.

COPYRIGHT 2007 - 2008 TEMENOS HEADQUARTERS SA. All rights reserved.


PRG2-Programming using T24 APIs

Table of Contents

Document History.......................................................................................................................... 3
WORKSHOP 1.......................................................................................................................... 4
Create a hashed file with the below mentioned structure to store details of trainees.............4
Workshop 2............................................................................................................................... 6
Write a program to display the following menu and perform appropriate action based on the
option chosen. All operations should be based on the TRAINEE file....................................6
WORKSHOP 3.......................................................................................................................... 9
Add a new field called STATUS in the TRAINEE table..........................................................9
Write a program which will check the number of tests passed by the trainee........................9
If the number is more than 5, then update the field STATUS to.............................................9
PERMANENT else PROBATION. Use dimensioned arrays in the program..........................9
Use MATREADU to read. Refer the [Link] website for details on the MATREADU
statement............................................................................................................................... 9
WORKSHOP 4........................................................................................................................ 10

Kalaiselvi| Corporate Training


3
PRG2-Programming using T24 APIs

WORKSHOP 1
Create a hashed file with the below mentioned structure to store
details of trainees

@ID NAME CLASSIFICATION REGION TESTS WRITTEN SPECIALIZATION


(Multimedia,
programming, testing)

1 TOM TECHNICAL INDIA T24 jBASE Oracle Programming


2 JOHN BUSINESS US Retail Treasury Programming Multimedia

3 HARRY TECHNICAL UK T24 jBASE Oracle DB2 Multimedia

Solution

Kalaiselvi| Corporate Training


4
PRG2-Programming using T24 APIs

Kalaiselvi| Corporate Training


5
PRG2-Programming using T24 APIs

Workshop 2
Write a program to display the following menu and perform
appropriate action based on the option chosen. All operations
should be based on the TRAINEE file.

Trainee File – Data Manipulation Menu


********************************************
1. INSERT (To insert a new record)
2. UPDATE (To update an existing record)
3. DISPLAY (Display the details of a given record)
4. DELETE (To delete an existing record)
5. Exit
Once a record id is accepted, a check to see if the record already exists has to take
place
If the record id exists
Insert operation should not be permitted
All other operations can be permitted
If the record id does not exist
Insert operation should be permitted
All other operations should not be permitted

*----------------------------------------------------------------------
-------
* <Rating>-50</Rating>
*----------------------------------------------------------------------
-------
PROGRAM [Link]
CRT "TRAINEE INFORMATION"
OPEN "TRAINEE" TO [Link] THEN
CRT "OPEN SUCCESSFUL"
END
ELSE
CRT "FILE NOT FOUND"
END
MYCHOICE:
CRT "TRAINEE FILE - DATA MANIPULATION MENU......."
CRT "---------------------------------------------"
CRT " 1. INSERT"
CRT " 2. DISPLAY"
CRT " 3. UPDATE"
CRT " 4. DELETE"
CRT " 5. EXIT"
CRT " ENTER THE ACTION U NEED TO PERFORM (NUMERIC VALUE) "
INPUT [Link]

BEGIN CASE
CASE [Link] = 1
GOSUB [Link]

Kalaiselvi| Corporate Training


6
PRG2-Programming using T24 APIs

CASE [Link] = 2
GOSUB [Link]
CASE [Link] = 3
GOSUB [Link]
CASE [Link] = 4
GOSUB [Link]
CASE [Link] = 5
EXIT(1)
CASE 1
CRT " INVALID OPTION ENTERED. EXITING ........."
EXIT(1)
END CASE
STOP
[Link]:
CRT "INSERTING TRAINEE DETAILS"
CRT "ENTER DETAILS TO CREATE A NEW RECORD"

[Link]=''

CRT "TRAINEE ID"


INPUT [Link]

CRT "NAME"
INPUT [Link]
[Link]<-1> =[Link]

CRT "CLASSIFICATION"
INPUT [Link]
[Link]<-1> = [Link]

CRT "REGION"
INPUT [Link]
[Link]<-1> = [Link]

CRT " TEST WRITTEN"


CRT " IF TRAINEE HAS TAKEN MULTIPLE COURSES DELIMIT VALUES USING
COMMA"
INPUT [Link]
[Link] = DCOUNT([Link],',')
FOR [Link] = 1 TO [Link]
[Link]=FIELD([Link],',',[Link],1)
[Link]<4,-1>=[Link]
NEXT [Link]

WRITE [Link] TO [Link],[Link] SETTING [Link] ON ERROR


CRT "RECORD COULD NOT WRITTEN"
CRT "REASON " :[Link]
END
GOSUB MYCHOICE

[Link]:
CRT "DISPLAYING TRAINEE INFO"
CRT " ENTER THE TRAINEE ID YOU WANT TO VIEW THE DETAILS"
INPUT [Link]
READ [Link] FROM [Link],[Link] SETTING [Link] ELSE
CRT "UNABLE TO READ RECORD"
CRT "REASON:":[Link]
EXIT(1)
END
CRT "TRAINEE ID:":[Link]

Kalaiselvi| Corporate Training


7
PRG2-Programming using T24 APIs

CRT "NAME:":[Link]<1>
CRT "CLASSIFICATION:":[Link]<2>
CRT "REGION:":[Link]<3>
CRT "TEST WRITTEN:":[Link]<4>
GOSUB MYCHOICE

[Link]:
CRT " UPDATING TRAINEE DETAILS"
CRT "ENTER THE RECORD ID FOR WHICH YOU WISH TO UPDATE"
INPUT [Link]
READU [Link] FROM [Link], [Link] LOCKED
CRT "LOCKED BY PORT:":SYSTEM(43)
END ELSE
CRT "RECORD DOES NOT EXIST"
END
[Link] ='Y'
LOOP
WHILE [Link] EQ 'Y' DO
CRT " ENTER THE FIELD NUMBER AND THE NEW VALUE DELIMITED BY
_(UNDERSCORE) "
CRT "1. NAME 2. CLASSIFICATION 3. REGION 4. TEST WRITTEN"
CRT "THE VALUE FOR TEST WRITTEN SHOULB BE DELIMITED WITH ',' "
INPUT [Link]
[Link]=FIELD([Link],'_',1,1)
[Link]=FIELD([Link],'_',2,1)
IF [Link]<[Link]> NE 4 THEN
[Link]<[Link]>=[Link]
END
ELSE
[Link]<4>=''
[Link]=DCOUNT([Link],',')
FOR [Link] = 1 TO [Link]
[Link]=FIELD([Link],',',[Link],1)
[Link]<4,-1>=[Link]
NEXT [Link]
END
CRT " IF U WISH TO COUNTINUE, INPUT 'Y'"
INPUT [Link]
REPEAT
WRITE [Link] TO [Link],[Link] SETTING [Link] ON ERROR
CRT " RECORD COULD NOT BE WRITTEN"
CRT "REASON:":[Link]
END

GOSUB MYCHOICE
[Link]:
CRT " DELETING TRAINEE DETAILS"
CRT "ENTER THE TRAINEE ID U WISH TO DELETE"
INPUT [Link]
DELETE [Link],[Link] SETTING [Link] ON ERROR
CRT "UNABLE TO DELETE THE RECORD"
CRT "REASON:":[Link]
END
GOSUB MYCHOICE
END

Kalaiselvi| Corporate Training


8
PRG2-Programming using T24 APIs

WORKSHOP 3
Add a new field called STATUS in the TRAINEE table.

Write a program which will check the number of tests passed by the
trainee.

If the number is more than 5, then update the field STATUS to

PERMANENT else PROBATION. Use dimensioned arrays in the


program.

Use MATREADU to read. Refer the [Link] website for


details on the MATREADU statement.

*----------------------------------------------------------------------
-------
* <Rating>-11</Rating>
*----------------------------------------------------------------------
-------
PROGRAM [Link]
CRT "UPDATING THE STATUS OF TRAINEE"
OPEN "TRAINEE" TO [Link] THEN
CRT " FILE OPENED SUCCESSFULLY"
END
ELSE
CRT " FILE NOT ABLE TO OPEN"
END
[Link]='SELECT TRAINEE'
EXECUTE [Link] RTNLIST [Link]
LOOP

REMOVE [Link] FROM [Link] SETTING POS


WHILE [Link]:POS
CRT [Link]:" "
DIM [Link](10)
MATREAD [Link] FROM [Link],[Link] ELSE
CRT "UNABLE TO READ RECORD"
END

Kalaiselvi| Corporate Training


9
PRG2-Programming using T24 APIs

[Link] = [Link](4)
[Link]=DCOUNT([Link],@VM)
IF [Link] GT 3 THEN
[Link](5)<1>='PERMANENT'
END
ELSE
[Link](5)<1>='PROBATION'
END
MATWRITE [Link] ON [Link],[Link]
REPEAT
END

WORKSHOP 4

*----------------------------------------------------------------------
-------
* <Rating>-11</Rating>
*----------------------------------------------------------------------
-------
PROGRAM [Link]
CRT "UPDATING THE STATUS OF TRAINEE"
OPEN "TRAINEE" TO [Link] THEN
CRT " FILE OPENED SUCCESSFULLY"
END
ELSE
CRT " FILE NOT ABLE TO OPEN"
END
[Link]='SELECT TRAINEE'
EXECUTE [Link] RTNLIST [Link]
TRANSTART
LOOP

REMOVE [Link] FROM [Link] SETTING POS


WHILE [Link]:POS
CRT [Link]:" "
DIM [Link](10)
MATREAD [Link] FROM [Link],[Link] ELSE
CRT "UNABLE TO READ RECORD"
END
[Link] = [Link](4)
[Link]=DCOUNT([Link],@VM)
IF [Link] GT 3 THEN
[Link](5)<1>='PERMANENT'
END
ELSE
[Link](5)<1>='PROBATION'
END
MATWRITE [Link] ON [Link],[Link]
REPEAT
TRANSEND
END

Kalaiselvi| Corporate Training


10

You might also like