0% found this document useful (0 votes)
318 views

TAFJ Commands v0.2

The document describes commands for the DBTools and TAFJ tools. It includes commands for logging in, querying data using JQL and SQL, executing OFS messages, and other utilities like history, aliasing, and help. Sections cover the different types of commands and examples of using each command.

Uploaded by

thuc nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
318 views

TAFJ Commands v0.2

The document describes commands for the DBTools and TAFJ tools. It includes commands for logging in, querying data using JQL and SQL, executing OFS messages, and other utilities like history, aliasing, and help. Sections cover the different types of commands and examples of using each command.

Uploaded by

thuc nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

TAFJ COMMANDS

MỤC LỤC
1. Introduce.............................................................................................................................................2
2. DBTools commands............................................................................................................................2
2.1. Login............................................................................................................................................2
2.2. JQL commands............................................................................................................................3
2.3. SQL commands............................................................................................................................4
2.4. OFS commands............................................................................................................................5
2.5. Others commands.......................................................................................................................6
3. TAFJ commands..................................................................................................................................7
4. Coding on TAFJ....................................................................................................................................9
4.1. Programming language...............................................................................................................9
4.2. Compile.......................................................................................................................................9
4.3. Debugging...................................................................................................................................9
4.4. Java source code generation.....................................................................................................10
5. Notes.................................................................................................................................................10
1. Introduce

2. DBTools commands
2.1. Login

DBTools -u <user name> -p <password> [-log <Log file name>]

Ví dụ:
DBTools -u tafj -p Tafj#1234

DBTools hỗ trợ 3 chế độ lệnh khác nhau:


- JQL: Thao tác dữ liệu qua JBase command
- SQL: Thao tác dữ liệu qua truy vấn dữ liệu trực tiếp trên Database
- OFS: Thực thi OFS message
2.2. JQL commands

Command
Command Sample
Type
COUNT COUNT FBNK.ACCOUNT
1977 Records Counted
LIST-ITEM LIST-ITEM F.COMPANY 'GB0010001'
id: GB0010001
1: Model Bank
2: 18 Place De Philosophes
3: BNK
COPY COPY FROM F.BATCH HALH,HALH.2
JED JED -s F.BATCH HALH 4=F;8.1=D;

JED F.BATCH HALH


-------------------------------------
File F.BATCH, Record HALH UNLOCKED
-------------------------------------
3 0
4 F
6.1 IC.COB
6.2 IC.COB
Command({l},i{l},d{l},b,f,c,r,s,x,help) :
LOCKS LOCKS
TableName |Record ID|Session ID
F_BATCH#NAU |HALH |401801218
RELEASE RELEASE F_BATCH#NAU HALH
STAT STAT FBNK.CURRENCY
JBase File |FBNK.CURRENCY
File Path |../bnk.data/st/FBNK_CURRENCY
Oracle File |FBNK_CURRENCY
Created Date |20-Mar-2019
Record Count |42
GETDBNAME GETDBNAME FBNK.ACCOUNT
Basic-T24 file name:|FBNK.ACCOUNT
Database file name:|FBNK_ACCOUNT
Database dict name:|D_F_ACCOUNT
Database view name:|V_FBNK_ACCOUNT

Các câu lệnh không hỗ trợ như trên TAFC:


- LIST xem chi tiết từng trường
- SELECT (1 cấp hay nhiều cấp)
- QSELECT
- CT
Chú ý: Có thể phát triển local tool để hỗ trợ 1 số câu lệnh (LIST/SELECT/ …)
2.3. SQL commands

Command
Command Sample
Type
SELECT COUNT(1) FROM F_COMPANY
------------------------
DBTools SQL
------------------------
COUNT(1)
42
1rows selected
SELECT RECID, XMLRECORD FROM F_COMPANY WHERE RECID =
'GB0010001'
---------------------------------------------------
DBTools SQL AUTO-COMMIT OFF
---------------------------------------------------
RECID |XMLRECORD
GB0010001 |<row id="GB0010001"> <c1>Model
Bank</c1>
1rows selected|
XML to SELECT RECID, extractValue(XMLRECORD,'/row/c2') AS
relation data CCY_CODE, extractValue(XMLRECORD,'/row/c3[1]') AS
CCY_NAME, extractValue(XMLRECORD,'/row/c33') AS COUNTRY
FROM FBNK_CURRENCY
--------------------------------------------
DBTools SQL AUTO-COMMIT
--------------------------------------------
RECID |CCY_CODE|CCY_NAME
TRY |949 |New Turkish Lira
MXN |484 |Mexican Nuevo Peso
USD |840 |US Dollar
XAV |111 |Avios Points
XIN |333 |Internal Points
XAI |223 |Aimia Point
AED |784 |United Arab Emirates Dirhams
Tables joining SELECT AC.RECID AS AC_ID, CU.RECID AS CUSTOMER_ID,
extractValue(AC.XMLRECORD,'/row/c2') AS CATEGORY,
extractValue(AC.XMLRECORD,'/row/c8') AS CURRENCY,
extractValue(CU.XMLRECORD,'/row/c2[1]') AS CUSTOMER_NAME
FROM FBNK_ACCOUNT AC, FBNK_CUSTOMER CU WHERE CU.RECID =
extractValue(AC.XMLRECORD,'/row/c1') AND AC.RECID =
'77976'
-------------------------------------
DBTools SQL
-------------------------------------
AC_ID |CUSTOMER_ID|CUSTOMER_NAME
77976 |190072 |General Trading Co
2.4. OFS commands

Thực thi câu lệnh OFS với OFS.SOURCE được thiết lập (mặc định là GCS)
Command
Command Sample
Type
Version CURRENCY,/S/PROCESS,LHHA01/123456/,USD
--------------------------------
DBTools OFS
--------------------------------
USD//1
RANK:1:1=0
NUMERIC.CCY.CODE:1:1=840
CCY.NAME:1:1=US Dollar
CCY.NAME:2:1=Dollar US
NO.OF.DECIMALS:1:1=2
QUOTATION.PIPS:1:1=4
DAYS.DELIVERY:1:1=1
DAYS.FORWARD:1:1=0
INTEREST.DAY.BASIS:1:1=B 366/360
CURRENCY.MARKET:1:1=1
Enquiry ENQUIRY.SELECT,,LHHA01/123456/,%CURRENCY
----------------------------------------
DBTools OFS
----------------------------------------
HEADER="No Historical Data Found for thi
@ID::Ccy Id/NUM.CCY::Ccy No/NO.OF.DECIMA
"AED" "784" "2 " " " "1 "
"AMD" " 51" "2 " " " "1 "
"ARS" " 32" "2 " " " "1 "
"AUD" " 36" "2 " "0 " "1 "
"AZN" "944" "2 " " " "1 "
"CAD" "124" "2 " " " "1 "
2.5. Others commands.

Command
Command Sample
Type
history history
History|Last command used
h1 |STAT FBNK.CURRENCY
h2 |RELEASE F_BATCH#NAU HALH
h3 |LOCKS
h4 |JED -s F.BATCH HALH 4=F;8.1=D;
h5 |JED -s F.BATCH HALH 4=X;
h6 |JED -s 'F.BATCH HALH 4=X;'
h7 |JED -s 'F.BATCH HALH 4=X'
h8 |JQL COPY FROM F.BATCH HALH,HALH.2
h9 |JED -s F.BATCH HALH 8.1=D
h10 |JED F.BATCH HALH
clear-history clear-history
alias alias CCYLS SELECT RECID, XMLRECORD FROM FBNK_CURRENCY
aliases aliases
Alias|Command
CCYLS|SELECT RECID, XMLRECORD FROM FBNK_CURRENCY
unalias unalias CCYLS
SPOOL SPOOL (ON/OFF)
Log to file DBTools -u tafj -p Tafj#1234 -log HalhLD

cat /home/r18mod/tafj_sp12/log/DBTools/HalhLD.log
help help
NAVIGATION |Type f to go forward to next page
commands |Type b to go backward to previous
|Type sr to scroll right to next c
|Type sl to scroll left to previou
|Type cm to disable\enable column
|Type hc to disable\enable first f
|Type hl to disable\enable first f
|Type x to exit
setup setup
1 MAX ROW RETRIEVED(SQL/ 200
2 MAX RECORDS PER PAGE 20
3 MAX LINE LENGTH 80
4 HISTORY SIZE MAX 10
5 SHOW SESSION LONG NAME false
6 SHOW PAGE NUMBER true
7 SQL AUTO-COMMIT false
8 LOG FILE HalhLD
9 OFS SOURCE GCS
10 OFS SEPARATOR ,
11 COLUMN SEPARATOR |
3. TAFJ commands

Command
Command Sample
Type
tDiag ---------------------------------------------------
(thay thế [r18mod@t24cbtp01:/home/r18mod]$ tDiag
---------------------------------------------------
jDiag) Home : '/home/r18mod/tafj_sp12'
Conf directory : '/home/r18mod/tafj_sp12/conf'
Log directory : '/home/r18mod/tafj_sp12/log'
Log directory T24: '/home/r18mod/tafj_sp12/log_T24'
Version : R18_SP12
---------------------------------------------------
java.home : /usr/java8_64/jre
java.vendor : IBM Corporation
java.version : 1.8.0
os.arch : ppc64
os.name : AIX
HostName : t24cbtp01
IP Address : 10.37.24.201
Runtime : Double Byte SysSeparator
---------------------------------------------------
tShow
[r18mod@t24cbtp01:/home/r18mod]$ tShow VPB.GET.FIELD
Home : '/home/r18mod/tafj_sp12'

- Project : 'tafj' [ FOUND ]


BASIC source :
'/home/r18mod/bnk/UD/TEMP.BP/VPB.GET.FIELD.b'
BASIC package : ''
BASIC Import(s) : 'com.temenos.t24'
JAVA class :
'/home/r18mod/tafj_sp12/data/tafj/classes/com/temenos/
t24/VPB_GET_FIELD_cl.class'
Compiled the : 02 Apr 2019 09:11:57
on : t24cbtp01
Compiled with TAFJ : R18_SP12.0
Timestamp : 1554171117721
Grammar : 3
Include Basic Replacement : false

Checking dependencies ...


Check completed
tCompile [r18mod@t24cbtp01:/home/r18mod/bnk/UD/TEMP.BP]$ tCompile
HALH.b
-------------------------------------------------------
Temenos TAFJ Compiler/Runner
TAFJCompiler.jar version "R18_SP12.0"
Copyright (c) 2009-2015 TEMENOS. All rights reserved
-------------------------------------------------------
Command
Command Sample
Type
Java Version = pap6480-20150129_02
Java File Encoding = UTF-8
Java Home = /usr/java8_64/jre
Java Classpath = Java(TM) SE Runtime Environment
-------------------------------------------------------
User Name = r18mod
Current Dir = /home/r18mod/bnk/UD/TEMP.BP
-------------------------------------------------------
OS Type = AIX
-------------------------------------------------------
Arguments :HALH.b
-------------------------------------------------------
Compiling... 0 error | 1 compiled | 0
remaining [100%] 00:00:00 ETA
Compilation completed for 1 file(s).
-------------------------------------------------------
Files With Error :
-------------------------------------------------------
Total Time : 0 [h] 0 [min] 12 [sec] 782 [ms]

tRun [r18mod@t24cbtp01:/home/r18mod]$ tRun VPB.GET.FIELD.INFO


AC BALANCE

Table Name: ACCOUNT

FIELD.NAME FM VM LEN DATA.TYPE


---------- -- -- --- ---------
WORKING.BALANCE 27 19 IN2AMT
ER.BALANCE 146 19 IN2AMT
EP.BALANCE 147 19 IN2AMT
BALANCE.CONVERSION.MKT 215 2 IN2

Chú ý:
- Compile 1 folder (với các file đuôi .b): tCompile <Folder Name>
- Decompile 1 routine: Gỡ file .class khỏi .jar file
4. Coding on TAFJ
4.1. Programming language
- Tiếp tục sử dụng ngôn ngữ lập trình Info Basic như trên TAFC
- Một số lệnh không hỗ trợ, sẽ cần phải review và convert code để chuyển đổi logic.
Ví dụ: Lệnh execute để SELECT lồng,….
- Các routine ví dụ của Temenos đều có thêm đuôi .b (Ví dụ VPB.HALH.b), tuy nhiên, nếu
không có đuôi này vẫn hoạt động bình thường, khác biệt nằm ở tính năng compile hàng
loạt routine trong folder, chỉ hỗ trợ file đuôi .b

4.2. Compile
- Sử dụng lệnh tCompile để Convert sang java và compile routine.
- Sử dụng lệnh tShow để xem thông tin compiled routine.

4.3. Debugging

Vẫn theo cơ chế DEBUG trên T24 App Server như trước đây.

Source changed to /home/r18mod/bnk/UD/TEMP.BP/HALH.b


58 : DEBUG
TAFJ Debugger-> ?
? : Help on commands
S : Step Over
s : Step In
C : Continue
c : Step Out
v <var> : Show <Var> content
b <line number> : Set the breakpoint
r <line number> : Remove the breakpoint
R : Remove All Break points for current source
j -g : Print Stack trace in debug mode
Q : Quit the current execution.
TAFJ Debugger->

Chú ý: Không còn hỗ trợ 1 số lệnh trên TAFC:


- W: để xem 1 khối source code.
- T: để xem thường trực giá trị một biến
4.4. Java source code generation

Cấu hình generate java source code:


File cấu hình: /home/r18mod/tafj_sp12/conf/tafj.properties

temn.tafj.compiler.generate.java=true
temn.tafj.directory.java=/home/r18mod/tafj_sp12/data/tafj/java

Sau khi compile, java source code sẽ được tự động generate ra thư mục:
/home/r18mod/tafj_sp12/data/tafj/java/com/temenos/t24

5. Notes
Một số chú ý khác:
- INSERT file (Ví dụ: I_F.ACCOUNT) mặc định của Temenos trước đây nằm trong
T24.BP, tuy nhiên trên TAFJ không còn nằm ở đây nữa mà được đóng gói trong các file
jar trên thư mục t24lib.  Bất tiện trong việc xem nội dung file INSERT mặc định
Giải pháp đề xuất: giải nén toàn bộ các file jar và đưa vào một thư mục chung, ví dụ
T24_INSERTS để có thể tham khảo khi cần.
- Chưa rõ các sử dụng 1 số vấn đề như trên TAFC:
o Save list
o VOC

You might also like