100% found this document useful (1 vote)
725 views125 pages

TAFJ DBtools

TAFJ-DBTools provides a console for accessing and managing databases through SQL, JQL, and other statements. The console allows users to execute commands and view results in a customizable interface. It integrates various TAFJ database tools and provides features like command history, result pagination, and record editing. Users must be authenticated through a username and password, which can be managed through user creation and reset tools. The console is accessed by launching the DBTools application and logging in.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
725 views125 pages

TAFJ DBtools

TAFJ-DBTools provides a console for accessing and managing databases through SQL, JQL, and other statements. The console allows users to execute commands and view results in a customizable interface. It integrates various TAFJ database tools and provides features like command history, result pagination, and record editing. Users must be authenticated through a username and password, which can be managed through user creation and reset tools. The console is accessed by launching the DBTools application and logging in.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 125

TAFJ-DBTools

Learning Objectives

Slide 2
What is TAFJ

 TAFJ (Temenos Application Framework Java) is a


Pick BASIC runtime and compiler, written in 100%
java.
 It allows compiling and running Pick BASIC
programs.
 TAFJ has been written specifically for T24 needs, and
all tests and proof of concepts have been done using
T24.
 TAFJ also manage the connectivity on JDBC
compliant databases like jBASE J4, Oracle, MS
SQL.
 It comes with an embedded exporting tool for migrate
your Pick data to Oracle.

Slide 3
What is TAFJ

Slide 4
Introduction

 TAFJ-DBTools Console provides access to SQL / JQL


/ OFS statements, and integrates various TAFJ tools
that deal with database within a unique application.
 It is also designed to help users to launch various
commands in a quick and efficient way by providing
aliases and history functionalities.
 Results are being displayed with a customizable and
friendly approach.

Slide 5
Introduction
 TAFJ-DBTools will be accessed only with
authenticated users. Hence username and password
has to be passed as parameters to DBTools.
 The users to access DBTools needs to be created
using a file tAddUser.bat/tAddUser.sh
t/tUserMgnt.bat/tUserMgnt.sh.
 If there are 3 unsuccessful attempts,user gets
blocked. The blocked user cannot be used further
until the user is reset with a new password or
delete/re-create.

Slide 6
DBTools console

Slide 7
DBTools console

 TAFJ-DBTools Console is a unique application that


gives uses the ability to launch SQL / JQL
statements, and integrate the various database
related TAFJ tools.
 It is also designed to help users to launch various
commands in a quick and efficient way by providing
aliases and history functionalities. It gives different
options to display query results. It’s built upon the
TAFJ-Core framework to be independent of any
native libraries and allows executing commands and
displaying results on system with possibly no X
Windows installed.

Slide 8
DBTools console

Slide 9
DBTools console

 DBTools Console can be launched from


TAFJ_HOME/bin. Use a putty Telnet connection to
<tafj_home>/bin and launch DBTools using the
following command.
 Here use 'TAFJ_Shell.bat' from R17\Env\Common\
Scripts\Slot01

Slide 10
DBTools console

 Command syntax to log in DBtools console


 DBTools [-u <username> –p <password> -cf
<configuration>[.properties]]
 The targeted database is the one defined in the
default configuration file or in the configuration file
specified with the -cf option.
 The username and password has to be passed along
with –u and –p option respectively.

Slide 11
User creation to access DBtools:

 TAFJ-DBTools will be accessed only with


authenticated users. Hence username and password
has to be passed as parameters to DBTools. If there
are 3 unsuccessful attempts, user gets blocked.
 User creation command Syntax:
 tAddUser -u username -p password
 tAddUser -u username -p password -cf
configuration.properties
 this command for create user in the configuration
file specified
 password must be minimum 8 digit, 1 uppercase, 1
lowercase and 1 special character

Slide 12
User creation to access DBtools

Slide 13
User Management for DBTools

 The blocked user cannot be used further until the


user is reset with a new password or delete/re-create.
 tUserMgnt is a User application designed to
add/Del/Reset users for use of DBTools and JED
applications.

Slide 14
User Management for DBTools

 Syntax
 The application could be launched from
TAFJ_HOME/bin.
 tUserMgnt << MODE >> << -u username>> << -p
password>>
 where MODE can be :
 --Add << -u username>> << -p password>> ; Add a
new User.
 --Reset << -u username>> << -p password>> ; Reset
an existing User.
 --Del << -u username>> ; Delete an existing User.

Slide 15
User Management for DBTools

 The username and encrypted password gets stored


in the property file.
 With the created username and password one can
access DBTools and JED application.
 The username and password has to be passed along
with –u and –p option respectively.
 The username and password is mandatory if either of
them passed as null then message “Missing user
credentials, please provide a user and password: -u
username -p password” is displayed.

Slide 16
Creating a new User:
User Management for DBTools

 Creating a new User

Slide 17
User Management for DBTools

 Reset an existing user:

Slide 18
User Management for DBTools

 Deleting an existing User

Slide 19
DBTools console

Slide 20
DBTools console

 When DBTools is launched, you can view the


DBTools HELP document automatically launched in
the main panel.
 For query results that are displayed on multiple
pages and/or multiple columns (by default 20 lines
are displayed per page and a line is 80 characters
long), the console provides you with navigation
commands to navigate the pages and columns.
 Read through the navigation commands for a good
control on navigating on the console. Type the
command “help” on the command line in the footer to
view this document.

Slide 21
DBTools console

 DBTools console consists of three


panels:
 Header panel that contains information about the
current mode or running command
 Main panel that contains the result of the last
executed command
 Footer panel that contains the command line

Slide 22
DBTools console - Header

 The header presents the following information:


 The current mode or running command
 A warning in case of unrecognized command
 The current page / column number and the total
number of page / column if the result of the command
is being displayed on multiple page and/or columns

Slide 23
DBTools console - Header

 In SQL Mode, you will in addition also see the auto-


commit status. By default it is set to off

Slide 24
DBTools console - Main panel

Slide 25
DBTools console - Main panel

 The main panel contains the command result to be


displayed or edited. It is displayed in columns and
rows.
 If the length of the result set of a command is greater
than the console’s maximum column length (80
characters by default), then only the first 80
characters are displayed in the first column, the
remaining data is wrapped to the next column i.e., 2.
In the example shown we can see column 1/7. Type
sr at the command prompt to scroll right to next
column and sl to scroll left.

Slide 26
DBTools console - Main panel

 If the result set of a command executed has more


rows than the console’s default (20 rows) it will be
displayed on multiple pages. Type f to move forward
to next page and b to move backward.
 The result set of the below Select is displayed on 2
pages and 7 columns as seen in the snapshot
 SELECT
RECID,RANK,CCY_NAME,NUMERIC_CCY_CODE,
BUY_RATE,SELL_RATE,COUNTRY_CODE,BASE_
CCY_RANK,NO_OF_DECIMALS,THE_RECORD
FROM V_FBNK_CURRENCY

Slide 27
DBTools console - Main panel

Slide 28
DBTools console - Main panel

 For command results that can be edited (for e.g.


editing a record), the field number is displayed on the
left margin of the panel adjacent to the data.
 Type the field number on the command line to made
the corresponding data in the field editable as shown.

Slide 29
DBTools console - Main panel

Slide 30
DBTools console - Main panel

 When working with very large result sets, column


headings located at the top and the record id in the
first column often disappear if you scroll too far to the
right (sr – next column) or down(f – forward to next
page). Without the headings and record ID, it's hard
to keep track of which column or row of data you are
looking at.
 To avoid this problem use the console’s freeze panes
feature.

Slide 31
DBTools console - Main panel

 It "freezes" or locks the recid column or topmost row


of the resultset so that they remain visible at all times.
 Freeze the top row – hl toggles between lock and
unlock the top row. By default locked.
 Freeze the recid column – hc toggles between lock
and unlock the first column. By default locked.

Slide 32
DBTools console - Main panel

Slide 33
DBTools console - Main panel

 Freeze the number of columns – By default a


maximum of 80 characters can only be displayed in
the first column.
 Result set displays greater than 80 characters spill to
the subsequent columns.
 If needed you can disable this feature in which case,
the entire record will get displayed only on the first
column.
 cm to enable / disable column mode

Slide 34
DBTools console - Footer

 The footer panel contains the command line that


shows by default the database connection
parameters: user name, database provider and
hostname.

 Depending on console setting it could also show the


hostname ip address and the database name.

Slide 35
DBTools -Database Functionalities

 The available functionalities are:


 Execute SQL statements
 Execute JQL statements
 Execute OFS statements
 Execute JED application (edit/modify record)
 Extract data from database to file
 Load data from file to database
 Show current locks on database
 Release locks on database
 Display statistics on table

Slide 36
DBTools -Database Functionalities

 We will first look at all the database functionalities


available on the DBTools Console
 Execution Modes - SQL, JQL, OFS and
DBCHECK
 Execute JED application (edit/modify record)
 Extract and load data from and to a database
 Show current locks and release locks on database
 Display table statistics

Slide 37
DBTools -Database Functionalities

 The console operates in 4 modes


 SQL – To execute SQL statements against a
running database if a user is more comfortable
with SQL than JQL. Type SQL at the command
line prompt in the footer
 JQL – To execute JQL commands against a
running database. Type JQL at the command line
prompt in the footer (t24@localhost:TAFJDB>) to
work on the console in JQL mode
 OFS – To pump OFS requests into a T24 area,
type OFS at the command line prompt in the
footer.
 DBCHECK – To check database integrity
Slide 38
Database Functionalities – SQL MOD

 To execute SQL statements, you must switch to SQL


mode by typing command “SQL” on the command
line or by prefixing your SQL command with SQL
keyword. The header panel displays the keyword
SQL to confirm that SQL mode is activated. The
console is now ready to execute SQL statements.
 To be recognized the statement must start with one of
the following keywords in uppercase:

Slide 39
Database Functionalities – SQL MOD
 SELECT
 INSERT
 UPDATE
 DELETE
 CREATE
 ALTER
 DROP
 COMMIT
 ROLLBACK
 DESCRIBE
 For e.g. SELECT * from FBNK_CURRENCY.
 In TAFJ by default the dot is converted to underscore.

Slide 40
Database Functionalities – SQL MOD
 By default the database connection is set to auto-
commit=false, that means if you don’t apply the
COMMIT statement after your data modification,
your change will be roll backed when exiting the
console.
 If a DML statement returns a result set, then the
result set is displayed. Else the number of rows
affected by the statement is displayed.
 SQL Exceptions are displayed on the console. To
avoid excessive memory usage when retrieving
important set of data, by default only the first 200
rows are displayed.
 Use setup to modify the defaults.

Slide 41
Database Functionalities – JQL MOD

 To execute JQL statements, first we have to enter


JQL mode by typing command “JQL” on the
command line or by prefixing your JQL command
with JQL keyword.

 Then you will see that JQL mode is activated in the


header panel.

 The console is now ready to execute JQL statements.

Slide 42
Database Functionalities – JQL MOD
 To be recognized the statement must start with one of
the following keywords in uppercase:
 COPY <<Source Table Name>> <<Destination Table
Name>> <<RecId optional>>
 COUNT <<VOC File name>>
 GETDBNAME <<VOC File name>>
 LIST-ITEM <<VOC File name>> <<WITH clause>>
 DESCRIBE <<View or Table Name Pattern>>
<<Column Name Pattern
 (optional)>>...ie. TAFJV_FBNK_CURR% %CURR%
 LOCATE-TABLE <<Table Name>> (z/OS only)
 CLEAR-FILE <<VOC File name>>

Slide 43
Database Functionalities – JQL MOD
 CREATE-FILE <<VOC File name>>
o Several different syntaxes can be used.
o To create a table with a particular table type
(XML,CLOB,BLOB,MULTICOLUMN,
o VARCHAR), use the syntax:
CREATE-FILE F.TESTROFILE TYPE=<<TYPE>>
o For read-only and $DIM files:
 Two commands are needed to create new T24 archive
tables.
 CREATE-FILE F.TESTROFILE TYPE=XML
ASSOCIATE="YES“
 The command above creates the table in the transactional
database and sets it up for a “read-only” pair.
 CREATE-FILE F.TESTROFILE$RO TYPE=XML
 DATABASE="TESTRODB" SCHEMA="TAFJRO"
READONLY="YES"

Slide 44
Database Functionalities – JQL MOD

o To specify MULTI-COLUMN file creation, an existing


dictionary is needed, ie. CREATE-FILE FBNK.CURRENCY.2
TYPE=MULTI-COLUMN DICT=D_F_CURRENCY
 DELETE-FILE <<VOC File name>>
 SHOWDICTS <<TYPE= (I|D|PH>> <<ATTRIBUTE=
(ALL| Attribute Number to Search>>
<<(STARTSWITH|ENDSWITH|CONTAINS)="Search
String">> <<FILE= FileName to log.>>
 Type <usage> at the command prompt to get a valid
list of commands supported

Slide 45
Database Functionalities – JQL MOD

 SHOWDICTS allows you to search all dictionary


items. Logs show up in $TAFJ_HOME/log.
 If the FILE parameter is not specified, the default
ShowDicts.txt is used.
 This example below shows any dict item I type with
ATTRIBUTE 2 containing the search “ENQ.TRANS”:
 DBTools>SHOWDICTS TYPE=I ATTRIBUTE=2
CONTAINS="ENQ.TRANS“ FILE=enqtrans.txt

Slide 46
Database Functionalities – JQL MOD
 The output file $TAFJ_HOME/log/enqtrans.txt would
look like:
 FMF1.MD.DEAL FMF1_MD_DEAL D_F_MD_DEAL
CUST.SECTOR I?CUSTOMER;
SUBR("ENQ.TRANS","CUSTOMER", @1, "SECTOR")??
CUST.SECTOR?4R?S????????CUSTOMER;
SUBR("ENQ.TRANS","CUSTOMER", @1, "SECTOR")
 FMF1.MD.DEAL FMF1_MD_DEAL D_F_MD_DEAL
INDUSTRY I?CUSTOMER;
SUBR("ENQ.TRANS","CUSTOMER", @1, "INDUSTRY")??
INDUSTRY?4R?S????????CUSTOMER;
 SUBR("ENQ.TRANS","CUSTOMER", @1, "INDUSTRY")

Slide 47
Database Functionalities – OFS MOD
 To execute OFS statements, first you have to enter
OFS mode by typing command “OFS” on the
command line or by prefixing your OFS command
with OFS keyword.

 Then you will see that OFS mode is activated in the


header panel.

 The console is now ready to execute OFS


statements, please note that your TAFJ properties file
must point to a valid T24 precompile directory or jars.

Slide 48
Database Functionalities – OFS MOD

 The default OFS source is GCS.

Slide 49
Database Functionalities – DBCHECK MOD

Slide 50
Database Functionalities – DBCHECK MOD

 CHECK NUMERICS - iterates the dictionary items


where dictionary items are defined as numeric. It then
tests those fields to make sure the data is indeed
numeric. As well, it tests those VOC items that are
defined rightJustified to see if the data is numeric.
 CHECK LENGTH - iterates the dictionary items and
gathers defined lengths and checks each against the
maximum length stored in the column. It reports
anything that is incorrectly defined. THIS COMMAND
TAKES A LONG TIME TO RUN (More than 3 hours
depending on the size of the DB).
 CHECK MISSING TABLE - iterates VOC items and
tests that the tables exist in the database.

Slide 51
Database Functionalities – CHANGE-TABLETYPE MOD

 CHANGE-TABLETYPE statements will allow you to


change a table type from one type of data storage to
another (example, from XML to CLOB, or vice-versa)
while moving the existing data to the new format.
 A backup file is created with the original data named
with the suffix .BACKUP of the target file. This
backup file is deleted by default.
 Dictionary tables are not supported. In addition, types
currently supported are XML, CLOB,BLOB, and
VARCHAR at the moment.

Slide 52
Database Functionalities – CHANGE-TABLETYPE MOD

 The CHANGE-TABLETYPE syntax is the following:


 CHANGE-TABLETYPE [options]
TABLE=<<J4FileName FROM=<<CLOB|BLOB|XML|
VARCHAR|MULTI-COLUMN >> TO=<<CLOB|BLOB|
XML|VARCHAR|MULTI-COLUMN>>
 The only valid option is:
 -nd : don't delete backup of old file.
 Example:
CHANGE-TABLETYPE
TABLE=FBNK.CURRENCY FROM=XML
TO=CLOB

Slide 53
Database Functionalities – CHANGE-TABLETYPE MOD

 The resulting output looks like this:

Slide 54
JED console to display and edit database

Slide 55
JED console to display and edit database

 You can call JED console to display and edit


database records by using command
 JED <<FILE NAME>> <<RECORD KEY>>

Slide 56
JED console to display and edit database

Slide 57
JED console to display and edit database
 To directly update a record without opening JED
Console command is:
 JED -s <<FILE NAME>> <<RECORD KEY>>
<<FIELD NUMBER>>=<<VALUE>>;

 For multiple attributes, separate them with “;”.

 Depending on the operating system you could have


to escape the part of command after –s option with
quotes: JED -s ‘F.TSA.SERVICE COB 6=START’;

Slide 58
Extract data from the database EXTRACT-TABLE

 This command allows extracting the records from a


table and writing them on the local file system.
Depending on the option you choose, the result will
be:
 -f : file mode (default). A set of distinct file, one per
record, the name of the file has the format
<filename>-<recordId>
 -d : directory mode. A directory having the name of
the table and inside this directory each record will be
stored in a distinct file, the name of this last file will be
the actual record Id.
 If any file or directory already exists, they will be
simply overridden.

Slide 59
Extract data from the database EXTRACT-TABLE

Slide 60
Load data into the database- LOAD-DATA

 This LOAD-DATA command loads data from your file


system into the database. You can load a single
record at a time or specify the directory itself as a
parameter to load a set of records
 -f : file mode (default) . The file name has the format
<filename>-<recordId>. If the file passed is a
directory, all files having the previous format will be
processed
 -d : directory mode. The parameter must be a
directory. This directory will be recursively processed
until a file is found. The parent directory of this file
represents the FileName, file name itself is the
recordsId

Slide 61
Load data into the database- LOAD-DATA

 To load a single record from a file on your file


system –
LOAD-DATA /CURRENCY/FBNK.CURRENCY-USD
where FBNK.CURRENCY-USD is a file in the
CURRENCY directory
 To load a set of records from a directory on your file
system –
LOAD-DATA /CURRENCY/FBNK.CURRENCY where
FBNK.CURRENCY is a directory containing
individual files for each record in the
FBNK.CURRENCY table.

Slide 62
Load data into the database- LOAD-DATA
 To load a single record from a file on your file system

 To load a set of records from a directory on your file


system

Slide 63
Lock Management - LOCKS
 LOCKS command displays record locks managed by
tLockManager or by TAFJ LOCK_RECORDS table
on the database. The different lock modes are
discussed in the session on TAFJ lock manager.

Slide 64
Lock Management - RELEASE

 The RELEASE locks command is specially designed


for tLockManager. It is used to release the locked
record from tLockManager.
 View the currently locked records by launching
command LOCKS and release the record you want
using the command RELEASE <<FILE NAME>>
<<RECORD ID>>

Slide 65
Lock Management - RELEASE

Slide 66
Database/Tables statistics
 This command allows to easily getting information
about your JBase file, JBase file path, JBase
equivalent database filename, created date and
record count.
 To get information about the file you have configured
type STAT <<FILE.NAME>>

 The resulting output looks like this:

Slide 67
Console Functionalities

Slide 68
Console Functionalities

 We shall look at all the console functionalities


 Console Help – we have already see how to invoke
help
 Command History
 Create, execute and delete aliases
 Setup command

Slide 69
Console Functionalities - HELP
 When opening DBTools Console the “HELP”
command will launched by default and the available
commands will be displayed on the main panel.

 You can access this screen whenever you want by


typing command “help” on the command line.

Slide 70
Console Functionalities - history

 Simply enter “history” on the command line.

Slide 71
Console Functionalities - history
 A history of last commands launched (10 last
commands by default) is maintained to give the ability
to reuse quickly last used command.
 Simply enter “history” on the command line. You will
get the resulting output that shows the list of last
used commands.
 Whether you are under history mode or not you can
recall the command you want by typing its history
index on the command line. i.e. you want to recall last
SQL command just type h1 and you will get that
command executed.
 You can clear history by typing the command clear-
history.

Slide 72
Console Functionalities - Aliases

 Four type of Aliases

Create an alias
Display an alias
Execute an alias
Remove an alias

Slide 73
Console Functionalities – Create an alias

 DBTools Console also provide an “alias” functionality to


reuse complex command efficiently.
 For example you often use the same JED statement to
setup F.TSA.SERVICE, record COB, status to “START”
and number of AGENT to “TEN”
 E.g.: JED F.TSA.SERVICE COB 3=TEN;6=START;
 You can create an alias to create a shortcut to this
command by typing :
 alias <<ALIAS NAME>><<BLANK>><<COMMAND>>

Slide 74
Console Functionalities – Display an alias

 To display all stored aliases you can type command


“aliases”

Slide 75
Console Functionalities – Execute an alias
 To execute this command just type the alias name on
the command line.

 if you create an alias for a SQL or JQL statement you


have to switch to the appropriate mode before calling
the alias or the command won’t be recognized.

Slide 76
Console Functionalities – Execute an alias

Slide 77
Console Functionalities – Remove an alias

 To delete an existing alias just type command unalias


<<ALIAS NAME>>

Slide 78
SETUP

 The setup command allows you to customize your


session by manipulating a list of properties.
 These properties are specified in the DBTools
properties file. As with all property file there is only
one DBTools.properties file for your TAFJ area and is
shared between all users.
 Type setup command:

Slide 79
SETUP

 Max row retrieved ( SQL) - This property allows you


to customize the maximum number of rows that
would be retrieved from a SQL SELECT statement.

Slide 80
setup

 This prevents memory exception in case the SQL


query yields a large result set. Value should be an
Integer, default value is 200.
 Max records per page - This property allows you to
customize the maximum number of results that would
be displayed in the main panel.
 Value should be an Integer, default value is 20. Make
sure your console is correctly sized to display the
requested number of records.

Slide 81
SETUP

 Max line length - This property allows you to


customize the maximum line length (i.e., columns)
that would be displayed in the main panel.
 Value should be an Integer, default value is 80. Make
sure your console is correctly sized to display the full
line length.

 History size max - This property allows you to


customize the maximum number of history
commands.
 Value should be an Integer, default value is 10.

Slide 82
SETUP

 Show session long name - This property allows you


to customize the session name that would be
displayed in the footer panel. When set to ‘true’
session long name is applied. Value should be a
Boolean, default value is false.
 Show page number - This property allows you to
display or hide information about page number and
column number in header panel. Value should be a
Boolean, default value is true.

Slide 83
SETUP
 SQL auto-commit - This property allows you to
enable / disable auto-commit on your database
connection. When running SQL statements with auto-
commit set to false, your change won’t be applied
unless you execute an explicit COMMIT statement
before exiting. Value should be a Boolean, default
value is false.
 Log file - This property allows logging command
result to the related log file by providing a log file
name. Default value is null, indicating command
result won’t be logged.
 OFS source and OFS separator – this property
allows you to configure the OFS source record and
the separator for working in the OFS mode

Slide 84
Navigation and display

 Change page/ column -For results that can’t be


displayed on a single page and/or a single column
(by default 20 lines are being displayed per page and
a line is 80 characters long), you have the ability to
navigate between pages by using the following
commands:
f to go one page forward.
b to go one page backward
sr to scroll right to next column
sl to scroll left to previous column

Slide 85
DBTools Console

 DBTools Console gives also the ability to launch the


console along with a command. Add your command
to the command line when launching DBTools
console
 DBTools [-cf <configuration>[.properties]] COMMAND
 Now the console opens with the result set of the
command.

Slide 86
Execution – interactive mode

 DBTools [-u <username> –p <password> -cf


<configuration>[.properties]] COMMAND
 To launch a SQL command as default command
when executing DBTools Console.

Slide 87
Execution – script mode

 Execution in script mode


 DBTools console allows you to execute the same
commands that you execute in the interactive mode,
in a script mode. In the script mode the command
gets executed against the running database without
opening the console. You just have to add ‘-s’ option
and the command you want to execute.
 DBTools –s JQL CLEAR-FILE F.EB.EOD.ERROR
 DBTools –s SQL INSERT INTO
MY_CURRENCYFILE VALUES (‘USD’,
‘THE_RECORD’)
 Note: Use the escape sequence \\ when using *
Slide 88
Execution – script mode

 When you execute a command in DBTools console,


the result set is buffered and displayed on the
console by default. Even when you use the script
mode –s, the command execution result set is
displayed on the command window without opening
the DBTools console. This output form is suitable for
commands that does not produce large execution
reports or result sets.

Slide 89
Log mode: execution report is append in a log file .

 When providing -log logFileName execution report is redirected


live to the related log file. This file is generated with .log
extension under TAFJ_HOME/log
 The “log mode” could be associated to the “script mode” by
combining -s and -log logFileName parameters. i.e
 DBTools -u <username> –p <password> -s -log currencyId
SQL SELECT RECID FROM FBNK_CURRENCY
 In that case all FBNK_CURRENCY IDs will be outputted to
the OS console and to currencyId.log under
TAFJ_HOME/log.
 In DBTools console use the Setup command to specify the log
file. Then the execution report will be displayed on the DBTools
console and also redirected to the log file. Use the SPOOL
command to turn on spool to redirect output to the log. To turn
off SPOOL, type SPOOL once again at the footer prompt. This
way you can control for which commands you want to log the
output.

Slide 90
Log mode: execution report is append in a log file .

 In DBTools console use the Setup command to


specify the log file. Then the execution report will be
displayed on the DBTools console and also redirected
to the log file. Use the SPOOL command to turn on
spool to redirect output to the log. To turn off SPOOL,
type SPOOL once again at the footer prompt. This
way you can control for which commands you want to
log the output.

Slide 91
Silent mode: no execution report

 When providing parameter -silent in “script mode”,


command is executed silently, no output is generated.
i.e.
DBTools -u <username> –p <password> -s -silent COMMAND

Slide 92
Change console display
 When displaying a result you have the ability to fix
the first line and / or the first column of the data being
displayed for all the pages and columns.
 It’s especially useful in case of SQL SELECT where
you might want to remain fixed the first line that
displays column names, and the first column that
displays the record id.
 By default DBTools console will split result into
columns in the case that the record to be displayed is
too large to fit on one unique column. You could
disable that functionality to have your record
displayed on a single column.

Slide 93
Change console display
 Type the following commands:
hc to enable / disable first fixed column
hl to enable / disable first fixed line
cm to enable / disable column mode

Slide 94
JED Console application

 The TAFJ-JED application is designed to edit and


modify database records by providing their file name
and record key. Like the DBTools console the JED
console is also built upon TAFJCore framework to be
independent of any native libraries. It could be called
from DBTools console as seen earlier and in
standalone mode too.
 The JED Console application is made to replace JED
GUI application on platforms with possibly no X
Window installed. : UNIX, AIX, z/OS.

Slide 95
Execution – Interactive mode

 Syntax
tJed [-u <username> –p <password> -cf
<configuration>[.properties]] <file name> <record
key>
 tJed -u <username> –p <password> F.SPF SYSTEM

Slide 96
Execution – Interactive mode

 Optional parameters
 Fields per page number
By default JED console is configured to display 20
fields per page.
tJed –u <username. –p <password> -l 50 F.SPF
SYSTEM
providing option line:-l <fields per page number>
you will be able to change dynamically this
property.
Please ensure that your terminal is correctly sized
to display the number of line required or the data
won’t be displayed properly.

Slide 97
Execution – Interactive mode

 Column names
By default JED console is configured to display a
record with no field name.
by providing the column name option: -cn you will
be able to retrieve the record field names if they
are defined in the related T24 application.
tJed -u <username> –p <password> -cn F.SPF
SYSTEM

Slide 98
Execution – Interactive mode

 Help
Use the help option to display the available
functionalities on the JED console -help
tJed -u <username> –p <password> -help F.SPF
SYSTEM
 LOCK
By default JED console will read the requested
record with no lock on it. To make a readu you
have to provide the LOCK parameter with value Y.
tJed -u <username> –p <password> F.SPF
SYSTEM LOCK=Y

Slide 99
Execution – Interactive mode
 JED Graphical mode
By providing option graphical user interface: -gui
you will be able to launch JED in graphical mode.
Useful when your T24 area does not have a
VT100 console. However on Unix systems X
Windows must be installed for launching the gui.
tJed -u <username> –p <password> -gui F.SPF
SYSTEM

Slide 100
Execution – Interactive mode

Slide 101
Execution - script mode
 It is also possible to modify a record without opening
it in JED console from command line. This is referred
to as the “script mode”.
 To update the record add ‘-s’ to the command along
with the field(s) number you want to change and
provide the associated values.
 Example
 To change in file F.TSA.SERVICE, COB record, field value
number of agent (WORK.PROFILE) and
 service status (SERVICE.CONTROL), you have to do the
following:
 On Windows - tJed -s F.TSA.SERVICE COB
3=TWO;6=START;
 On UNIX (use quotes)- tJed -s ‘F.TSA.SERVICE COB
3=TWO;6=START;’

Slide 102
Execution - script mode

 The record will get updated without opening the


console. It also works for multi-value and sub-value
fields. i.e. tJed –s MY.FILE MYRECORD
1.1=VM;2.1.1=SM;
 tJed -s F.TSA.SERVICE COB 3=TWO;6=START;
 It also works for multi-value and sub-value fields. For
e.g. tJed –s MY.FILE MYRECORD
1.1=multivaluefield;2.1.1=subvaluefield;

Slide 103
Understanding the UI (Presentation)

 JED console consists of three panels:


Header panel that contains information about the
record
Main panel that contains the record to be edited
Footer panel that contains the command line

Slide 104
Understanding the UI (Presentation)

 Header
 The header presents information related to the edited
record:
File name
Record key
Record lock status : the value could be
UNLOCKED (default) / LOCKED depending on
LOCK parameter provided

Slide 105
Understanding the UI (Presentation)
 A record being viewed on the JED console can be in
one of the following four ‘states’
 empty - default, no change made to the currently
displayed record
 WAITING – displayed when a field is getting edited …
waiting for user entry
 PENDING – record displayed on console has been
modified, but the changes not committed into
database.
 SAVED – record modification stored in database.
(type ‘s’ at the command line to save the record)

Slide 106
Understanding the UI (Presentation)

 Console display mode : value could be empty


(default, that means large record will be displayed on
multiple line and on a single column)
 COLUMN MODE (that means large record will be
displayed on single line and multiple column

Slide 107
Understanding the UI (Presentation)
 Main panel
The main panel contains the record to be
displayed. The record is displayed vertically. Each
field is displayed in a row. Each row displays a
number that correspond to a single value field no
(i.e., 11 is FREQUENCY field), a multi-value field
with its MV position (i.e. 15.5 is the fifth
multivalued Date field) or a sub-value field no with
the SV position (i.e.1.1.1).
The field number is displayed on a margin on the
panel left; the field data is displayed adjacent to
the margin
JED console can display 80 characters per row,
by default the margin is 5 characters long and so
the data part 75 characters long.
Slide 108
Understanding the UI (Presentation)

 Footer
The footer panel contains the command line that
shows some of the available commands. It can
also contain some instructions related to console
current mode.
Classic mode, waiting for user command

Editing mode, waiting for user validation

Slide 109
tJed Functionalities - Change a record

Slide 110
tJed Functionalities - Change a record

Slide 111
tJed Functionalities - Change a record

 Edit an existing field / Multi-value / Sub-value


 To edit an existing field, multi-value or sub-value just type
the field, VM, SM number on the command line, even if the
field isn’t on the current page.
 The prompt will be placed on the related page and line and
you will be able to change the field value.
 The current field value is placed into bracket that allows you
to see if there are blank characters in the current value.
 To validate the change, type “enter” and you will return to
command line.
 You will see the record status changing from WAITING to
PENDING during this process

Slide 112
tJed Functionalities - Change a record

 Insert a field / Multi-value / Sub-value


 To insert a new field, multi-value or sub-value just type the
command i followed by the field, VM, SM number on the
command line.
 The prompt will be placed on the related page and line and
you will be able to insert the field value.
 To validate the insertion, type “enter” and you will return to
command line.
 You will see the record status changing from WAITING to
PENDING during this process.

Slide 113
tJed Functionalities - Change a record
 Delete a field / Multi-value / Sub-value
 To delete a field, multi-value or sub-value just type the
command d followed by the field, VM, SM number on the
command line.
 The fields, multi-values, sub-values that follow the deleted
field will be renumbered.

Slide 114
tJed Functionalities - Change a record

 Delete a record
 You can delete a record by typing command d.
 You will be asked for confirmation.

Slide 115
tJed Functionalities - Validation
 Cancel pending changes
 You have the ability to cancel all your pending modifications
by typing command c. The record will be restored at its initial
state or at its state just after your last save. You will see the
record status changing from PENDING to empty during this
process.

Slide 116
tJed Functionalities - Validation
 Save pending changes
 To update your pending modifications into database, you
can use command s.
 You will see the record status changing from PENDING to
SAVED.
 You will see the record status changing from PENDING to
SAVED

Slide 117
tJed Functionalities - Validation
 Refresh data
 The command r will allow you to reload the record from the
database, that way you will be able to see external
modification that have been applied to the record since you
have loaded it.
 The record status will be set to its default empty value.

Slide 118
TAFJ –DBTools DBCheck

 DBCheck

Slide 119
TAFJ –DBTools DBCheck

 Introduction
 DBCheck is part of the TAFJ-DB tools. It allows checking your
database integrity by selecting from the TAFJ_VOC all the
tables, and for each, it will do the following:
 Open the table and check its type
 Write a test record on it
 Read that test record
 Read that test record and lock it
 Delete the test record
 These operations are being displayed on the console with the
format:
 Table name - Table type - W(write) R(read) RU (read and lock)
D (delete) - Time elapsed

Slide 120
TAFJ –DBTools DBCheck

 Syntax
 The DBCheck syntax is the following:
 DBCheck [-cf <configuration>[.properties]]
 The targeted database will be the one defined in your default
configuration file or in the configuration specified by the -cf
option.

Slide 121
TAFJ –DBTools DBCheck

 Command: DBCheck
 output looks like this:

Slide 122
Summary

Slide 123
Workshop

Slide 124
Thank You!
Questions / Discussion

Slide 125

You might also like