Вы находитесь на странице: 1из 9

12/12/2018 T24 Knowledge Bank: T24 Programs and Routines

T24 Knowledge Bank


Temenos T24, Design Studio, AA.ARRANGEMENT, Basic Routines, TAFC, TAFJ.

T24 Home T24 Basics T24 Arrangement Architecture T24 Design Studio About Contact Us Privacy Policy

Showing posts with label T24 Programs and Routines. Show all posts

How to read Sample XML file in T24? Se


READ SAMPLE XML

PROGRAM TEST.XML

$INSERT I_COMMON
$INSERT I_EQUATE

Y.PATH = "/data/TAFJ/samples/basic/ARJUN.BP"
Y.FNAME = "test.xml"
Y.TEMP1 = ""
Y.TEMP2 = ""

OPENSEQ Y.PATH,Y.FNAME TO SEQ.PTR THEN


LOOP
READSEQ Y.FLD.VAL FROM SEQ.PTR THEN
PRINT Y.FLD.VAL

Y.TEMP1 = FIELD(Y.FLD.VAL,"<name>",2)
Y.TEMP2 = FIELD(Y.TEMP1,"</name>",1)
Y.TEMP1 = FIELD(Y.FLD.VAL,"<mob.no>",2)
Y.TEMP3 = FIELD(Y.TEMP1,"</mob.no>",1)

Y.TEMP1 = FIELD(Y.FLD.VAL,"<address>",2)
Y.TEMP4 = FIELD(Y.TEMP1,"</address>",1)

Y.TEMP1 = FIELD(Y.FLD.VAL,"<street>",2)
Y.TEMP5 = FIELD(Y.TEMP1,"</street>",1)

Y.TEMP1 = FIELD(Y.FLD.VAL,"<d.no>",2)
Y.TEMP6 = FIELD(Y.TEMP1,"</d.no>",1)

Y.TOT<-1> = Y.TEMP2 : Y.TEMP3 : Y.TEMP4 : Y.TEMP5 : Y.TEMP6

END ELSE

PRINT "NO RECORDS FOUND"

CHANGE FM TO "*" IN Y.TOT


CHANGE VM TO "|" IN Y.TOT
CHANGE SM TO "!" IN Y.TOT

PRINT Y.TOT
BREAK
END
REPEAT
END ELSE
PRINT "FILE NOT FOUND"

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 1/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
CLOSESEQ SEQ.PTR
END
END

at September 13, 2018


Reactions: funny (0) interesting (1) cool (0)

No comments:

Labels: T24 Programs and Routines

How to create Versions through Routines in T24?


CREATING VERSIONS

SUBROUTINE TEST.VERSION

$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.VERSION

GOSUB INIT
GOSUB LOAD
GOSUB PROCESS

INIT:
Y.K = ""
Y.V_TABLE_NAME = ""
Y.VERSION_NAME = ""
FN.VER = "F.VERSION"
F.VER = ""
FN.SS = "F.STANDARD.SELECTION"
F.SS = ""
R.VER = ""
Y.ERR = ""

RETURN

LOAD:
CALL OPF(FN.VER,F.VER)
CALL OPF(FN.SS,F.SS)
RETURN
Blo
PROCESS:

CRT "Enter The Table Name to which the Version has to be created"

INPUT Y.V_TABLE_NAME

IF Y.V_TABLE_NAME = "" THEN

PRINT "APPLICATION NAME SHOULD N'T BE EMPTY"
GOSUB PROCESS

END ELSE
CALL F.READ(FN.SS,Y.V_TABLE_NAME,R.SS,F.SS,Y.ERR)

IF R.SS = "" THEN To


PRINT "APPLICATION MISSING"
GOSUB PROCESS

END ELSE
* GOSUB VERSTART Ab
https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 2/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
END
END

VERSTART:
CRT "Enter The Version Name"
INPUT Y.VERSION_NAME
Fo
IF Y.VERSION_NAME = "" THEN
Fol
PRINT "VERSION NAME SHOULD NOT BE EMPTY ...!"
GOSUB VERSTART
END
F
ELSE
Y.VERID = Y.V_TABLE_NAME :",": Y.VERSION_NAME
CALL F.READ(FN.VER,Y.VERID,R.VER,F.VER,Y.ERR) Co
IF R.VER NE "" THEN
PRINT "VERSION ALREADY EXIST WITH THIS NAME....PLEASE TRY WITH Nam
GOSUB VERSTART
END
Em
END

* FORMING NAME CONVENSION


Me
Y.VER_ID = Y.V_TABLE_NAME :"?": Y.VERSION_NAME
Y.VAR1 = "1"
Y.VAR2 = "1"
* Y.VAR3 = Y.VER_ID
Y.VAR4 = "1"
Y.VAR5 = "1" S

R.VER<EB.VER.RECORDS.PER.PAGE> = Y.VAR1
R.VER<EB.VER.FIELDS.PER.LINE> = Y.VAR2
* R.VER<EB.VER.HDR.1.1..039> = Y.VAR3
R.VER<EB.VER.LANGUAGE.CODE> = Y.VAR4
R.VER<EB.VER.NO.OF.AUTH> = Y.VAR5
*-------------------------------------------------------------------------

APP.NAME = "VERSION"
OFSFUNCT = "I"
PROCESS = "PROCESS"
OFSVERSION = "VERSION,TEST"
GTSMODE = ""
NO.OF.AUTH = 0
WERR = ""
TRANSACTION.ID = Y.VER_ID
CALL OFS.BUILD.RECORD(APP.NAME,OFSFUNCT,PROCESS,OFSVERSION,GTSMODE,NO.OF.AUTH,TRANSACTION.ID,R.VER,OFSRECORD)
* Y.OFS.SOURCE = "OFSGLOBUS"
* CALL OFS.POST.MESSAGE(OFSRECORD,Y.OFS.MSG.KEY,Y.OFS.SOURCE,"")
OFS.SOURCE.ID = "OFS.LOAD"
CALL.INFO<1> = OFS.SOURCE.ID
CALL.INFO<4> = ''
Y.TXN.COMMITTED = ''
CALL OFS.CALL.BULK.MANAGER(CALL.INFO, OFSRECORD, Y.OFS.RESPONSE, Y.TXN.COMMITTED)
END

at September 13, 2018


Reactions: funny (0) interesting (0) cool (1)

No comments:

Labels: T24 Programs and Routines

T24 Routine Example - Flat file Read ,Write and OFS Write
https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 3/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines

1. SUBROUTINE TEST02
2. $INSERT I_COMMON
3. $INSERT I_EQUATE
4. $INSERT I_F.ACCOUNT
5. $INSERT I_F.FUNDS.TRANSFER
6. $INSERT I_F.DATA.CAPTURE
7. $INSERT I_F.DC.BATCH.CONTROL
8.
9. GOSUB INIT
10. GOSUB OPEN
11. GOSUB PROCESS
12. RETURN
13.
14.
15. INIT:
16.
17. FN.DC = "FBNK.DATA.CAPTURE"
18. F.DC = ""
19. FN.ACC = "FBNK.ACCOUNT"
20. F.ACC = ""
21. FN.FT = "FBNK.FUNDS.TRANSFER"
22. F.FT = ""
23. FN.DC.BCTRL = "FBNK.DC.BATCH.CONTROL"
24. F.DC.BCTRL = ""
25.
26. Y.DEB.OR.CRE = ""
27. Y.DC.ID = ""
28. Y.ACC.ID = ""
29. Y.SIGN = ""
30. Y.AMOUNT = ""
31. Y.TXN.CODE = ""
32. Y.WOR.BAL = ""
33. Y.OUT.ARY = ""
34. Y.DEB.ACC.COUNT = ""
35. Y.DEB.ACC.LIST = ""
36. Y.PATH = ""
37. Y.FNAME.IN = ""
38.
39. PRINT "ENTER THE INPUT FILE PATH WITH \ AT THE END...!"
40. INPUT Y.PATH
41. PRINT "ENTER THE INPUT RECORD NAME"
42. INPUT Y.FNAME.IN
43.
44. Y.FNAME.OUT = ""
45. Y.FNAME.OUT = ""
46. PRINT CHAR(013)
47. PRINT CHAR(013)
48. PRINT "SALARY PROCESING"
49. PRINT CHAR(013)
50. PRINT CHAR(013)
51. RETURN
52.
53. OPEN:
54. CALL OPF(FN.DC, F.DC)
55. CALL OPF(FN.ACC, F.ACC)
56. CALL OPF(FN.FT, F.FT)
57. CALL OPF(FN.DC.BCTRL, F.DC.BCTRL)
58. RETURN

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 4/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
59.
60. PROCESS:
61.
62. OPENSEQ Y.PATH:Y.FNAME.IN TO SEQ.PTR THEN
63. LOOP
64. READSEQ Y.INP FROM SEQ.PTR THEN
65.
66. Y.DEB.OR.CRE = FIELD(Y.INP, ":",1)
67. Y.DC.ID = FIELD(Y.INP, ":",2)
68. Y.ACC.ID = FIELD(Y.INP, ":",3)
69. Y.SIGN = FIELD(Y.INP, ":",4)
70. Y.AMOUNT = FIELD(Y.INP, ":",5)
71. Y.TXN.CODE = FIELD(Y.INP, ":",6)
72.
73. R.DC<DC.DC.ACCOUNT.NUMBER> = Y.ACC.ID
74. R.DC<DC.DC.SIGN> = Y.SIGN
75. R.DC<DC.DC.AMOUNT.LCY> = Y.AMOUNT
76. R.DC<DC.DC.TRANSACTION.CODE> = Y.TXN.CODE
77.
78. GOSUB VALIDATION
79.
80. * CALL F.WRITE(FN.DC, Y.DC.ID, R.DC)
81. * CALL JOURNAL.UPDATE("")
82.
83. APP.NAME = "DATA.CAPTURE"
84. OFSFUNCT = "I"
85. PROCESS = "PROCESS"
86. OFSVERSION = "DATA.CAPTURE,TEST"
87. GTSMODE = ""
88. NO.OF.AUTH = 0
89. WERR = ""
90. TRANSACTION.ID = Y.DC.ID
91.
92. CALL
OFS.BUILD.RECORD(APP.NAME,OFSFUNCT,PROCESS,OFSVERSION,GTSMODE,NO.OF.AUTH,TRANSACTION.ID,R.DC,OFSRECORD)
93.
94. Y.OFS.SOURCE = "OFSGLOBUS"
95. CALL OFS.POST.MESSAGE(OFSRECORD,Y.OFS.MSG.KEY,Y.OFS.SOURCE
96.
97.
98. OFS.SOURCE.ID = "OFS.LOAD"
99. CALL.INFO<1> = OFS.SOURCE.ID
100. CALL.INFO<4> = ''
101. Y.TXN.COMMITTED = ''
102. CALL OFS.CALL.BULK.MANAGER(CALL.INFO, OFSRECORD, Y.OFS.RESPONSE, Y.TXN.COMMITTED)
103.
104. *\\ WRITING DATAS IN OUT FILE FOR VERIFICATION
105.
106.
107. CALL F.READ(FN.DC, Y.DC.ID, R.DCC, F.DC, Y.ERR)
108.
109. IF R.DCC NE "" THEN
110. R.DC<DC.DC.OUR.REFERENCE> = "TXN COMPLETED"
111. Y.ACC.ID = R.DCC<DC.DC.ACCOUNT.NUMBER>
112. Y.SIGN = R.DCC<DC.DC.SIGN>
113. Y.AMOUNT = R.DCC<DC.DC.AMOUNT.LCY>
114. Y.TXN.CODE = R.DCC<DC.DC.TRANSACTION.CODE>
115.
116. CALL F.WRITE(FN.DC, Y.DC.ID, R.DCC)
117. CALL JOURNAL.UPDATE("")

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 5/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
118.
119. IF Y.DEB.OR.CRE = "DEBIT" THEN
120. Y.OUT.ARY = Y.OUT.ARY : CHAR(010)
121. END
122. Y.OUT.ARY = Y.OUT.ARY : Y.DC.ID : "|" : Y.ACC.ID : "|"
123.
124.
125. END
126.
127.
128. END ELSE
129. PRINT "NO DATA IN SPECIFIED FILE"
130. GOSUB OUT.FILE.WRITE
131.
132. BREAK
133. END
134. REPEAT
135. END ELSE
136. PRINT "INPUT FILE NOT FOUNT IN " : Y.PATH : Y.FNAME.IN
137. END
138. RETURN
139.
140.
141.
142. VALIDATION:
143.
144. CALL F.READ(FN.ACC, Y.ACC.ID, R.ACC, F.ACC, Y.ERR)
145.
146. IF R.ACC = "" THEN
147. PRINT "INVALID DEBIT ACC ..! PLEASE ENTER THE VALID ACCOUNT "
148. GOTO PROCESS
149.
150. END ELSE
151.
152. IF Y.DEB.OR.CRE EQ "DEBIT" THEN
153. Y.WOR.BAL = R.ACC<27> ;*// R.ACC<27> = WORKING.BALANCE
154. IF Y.WOR.BAL LT '0' THEN
155. PRINT "WORKING BALANCE IS LESS THAN ZERO...! PLEASE ENTER
156. GOTO PROCESS
157. END
158. Y.DEB.ACC.COUNT ++
159. Y.DEB.ACC.LIST : = Y.DC.ID[1,14] : "|"
160.
161.
162. END
163. END
164.
165. RETURN
166.
167.
168. OUT.FILE.WRITE:
169.
170. CLOSESEQ SEQ.PTR
171.
172. * FOR Y.DEB.ACC.COUNT TO 0
173. LOOP
174.
175. WHILE Y.DEB.ACC.COUNT > 0 DO
176. Y.DC.BCTRL.ID = FIELD(Y.DEB.ACC.LIST,"|",Y.DEB.ACC.COUNT)

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 6/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
177. CALL F.READ(FN.DC.BCTRL, Y.DC.BCTRL.ID, R.DC.BCTRL,F.DC.BCTRL, Y.E
178. IF R.DC.BCTRL NE "" THEN
179. Y.OUT.ARY = Y.OUT.ARY : CHAR(010) : CHAR(010) : "DC.BATCH.CONT
180. END
181.
182. Y.DEB.ACC.COUNT = Y.DEB.ACC.COUNT - 1
183. REPEAT
184. * NEXT
185.
186. * Y.DC.BCTRL.ID = Y.DC.ID[1,14]
187. * CALL F.READ(FN.DC.BCTRL, Y.DC.BCTRL.ID, R.DC.BCTRL,F.DC.BCTRL, Y.ERR)
188.
189. * IF R.DC.BCTRL NE "" THEN
190. * Y.OUT.ARY = Y.OUT.ARY : CHAR(010) : "DC.BATCH.CONTROL STATUS OF T
191. * END
192.
193. OPENSEQ Y.PATH:"DC.OUT.":Y.DC.ID:".txt" TO Y.APP.FILE ELSE
194. CREATE Y.APP.FILE ELSE RETURN
195. Y.OUT.PATH = Y.APP.FILE
196. WRITESEQ Y.OUT.ARY TO Y.APP.FILE ELSE NULL
197. PRINT CHAR(1):CHAR(10): "OUT FILE HAS BEEN WRITEN IN PATH - " : Y.
198. CREATE Y.APP.FILE ELSE RETURN
199. Y.OUT.PATH = Y.APP.FILE
200. WRITESEQ Y.OUT.ARY TO Y.APP.FILE ELSE NULL
201. PRINT CHAR(1):CHAR(10): "OUT FILE HAS BEEN WRITEN IN PATH - " : Y.
202. END
203. CLOSESEQ Y.APP.FILE
204.
205. RETURN
206.
207.
208. END

at June 04, 2018


Reactions: funny (0) interesting (0) cool (0)

No comments:

Labels: T24 Programs and Routines

How to write a Record through OFS in T24


SUBROUTINE TEST01

$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.DATA.CAPTURE

R.DC<DC.DC.ACCOUNT.NUMBER> = Y.ACC.ID
R.DC<DC.DC.SIGN> = Y.SIGN
R.DC<DC.DC.AMOUNT.LCY> = Y.AMOUNT
R.DC<DC.DC.TRANSACTION.CODE> = Y.TXN.CODE

APP.NAME = "DATA.CAPTURE"
OFSFUNCT = "I"
PROCESS = "PROCESS"
OFSVERSION = "DATA.CAPTURE,TEST"
GTSMODE = ""

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 7/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
NO.OF.AUTH = 0
WERR = ""
TRANSACTION.ID = Y.DC.ID

CALL OFS.BUILD.RECORD(APP.NAME,OFSFUNCT,PROCESS,OFSVERSION,GTSMODE,NO.OF.AUTH,TRANSACTION.ID,R.DC,OFSRECORD)

OFS.SOURCE.ID = "OFS.LOAD"
CALL.INFO<1> = OFS.SOURCE.ID
CALL.INFO<4> = ''
Y.TXN.COMMITTED = ''
CALL OFS.CALL.BULK.MANAGER(CALL.INFO, OFSRECORD, Y.OFS.RESPONSE, Y.TXN.COMMITTED)

RETURN
END

at May 26, 2018


Reactions: funny (0) interesting (0) cool (0)

No comments:

Labels: T24 Programs and Routines

Sample F.WRITE Code


FN.FILENAME = 'F.FILENAME' ;
FV.FILENAME = ''
CALL OPF(FN.FILENAME, FV.FILENAME)

R.RECORD<DX.CM.FIELD1> = 'TOTO'
R.RECORD<DX.CM.FIELD2> = 'TUTU'
R.RECORD<DX.CM.FIELD3> = 'TITI'

CALL F.WRITE(FN.FILENAME, RECORD.ID, R.RECORD)


CALL JOURNAL.UPDATE(RECORD.ID)

at May 24, 2018


Reactions: funny (0) interesting (1) cool (0)

No comments:

Labels: T24 Programs and Routines

Sample Hello World Code


PROGRAM TEST.MAIN
*-----------------------------------------------------------------------------
*
*-----------------------------------------------------------------------------
* Modification History :
*-----------------------------------------------------------------------------
$INSERT I_COMMON
$INSERT I_EQUATE
*-----------------------------------------------------------------------------

CRT 'HELLO WORLD'


END

OUTPUT:
HELLO WORLD

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 8/9
12/12/2018 T24 Knowledge Bank: T24 Programs and Routines
at May 24, 2018
Reactions: funny (0) interesting (0) cool (0)

No comments:

Labels: T24 Programs and Routines

Home Older Posts

Subscribe to: Posts (Atom)

@raja.arjun. Theme images by duncan1890. Powered by Blogger.

https://www.t24knowledgebank.in/search/label/T24%20Programs%20and%20Routines 9/9