TAFC to TAFJ
DBTools: The TAFJ Tool Nobody Tells You About
If you upgraded from TAFC to TAFJ and tried to run a SELECT in the command line on day one, you know exactly what this article is about. It did not work. And nobody warned you.
In TAFC, you could fire a SELECT straight from the T24 command line. Quick, direct, done. In TAFJ that is gone. The replacement is DBTools — a separate console application that runs outside of T24 entirely. It is not difficult to use once you know it exists. The problem is that most people find out about it the wrong way: by trying to do something they have done a hundred times and getting nothing back.
What DBTools actually is
DBTools is a standalone command-line console — not part of the T24 Browser, not part of the application server, not accessible from within T24 itself. You run it separately, from the server, using its own launcher in TAFJ_HOME/bin.
It gives you three things:
- SQL mode — standard SQL statements against the underlying database
- JQL mode — T24-style file operations (COUNT, LIST-ITEM, COPY, CREATE-FILE, CLEAR-FILE and more)
- JED — a built-in record editor for reading and modifying T24 data directly
In TAFC, ad-hoc database work happened inside T24. In TAFJ, it happens here.
Getting in
Launch DBTools from the command line:
DBTools -u <username> -p <password> -cf <configuration>.propertiesThe configuration file points DBTools at the right database. On most setups there is a default, but on environments with multiple databases you will need to specify which one.
The credentials problem
DBTools does not use your T24 username and password. It has its own separate user accounts, created with a separate tool — tUserMgnt — also in TAFJ_HOME/bin:
tUserMgnt --Add -u <username> -p <password>
tUserMgnt --Reset -u <username> -p <password>
tUserMgnt --Del -u <username>If nobody has set up your DBTools user, you cannot get in. If you type your T24 credentials and get rejected, that is why. Three failed attempts locks the account — it cannot be used again until someone resets or recreates it.
If you are reading this because you just got locked out on your third attempt, you are not the first person to discover this the hard way. Get someone with access to run tUserMgnt --Reset and then set the accounts up properly before the next incident.
Running queries
SQL mode
Type SQL on the command line to switch into SQL mode. Keywords must be in uppercase:
SELECT * FROM FBNK_CURRENCY
SELECT RECID, CURRENCY.NAME FROM FBNK_CURRENCY WHERE RECID = 'GBP'The auto-commit gotcha
Auto-commit is off by default. If you run an UPDATE or DELETE and exit without committing, your changes are rolled back silently. No warning. Nothing happened.
UPDATE FBNK_CURRENCY SET CURRENCY.NAME = 'Pound Sterling' WHERE RECID = 'GBP'
COMMITCheck the header panel for the auto-commit status when you are in SQL mode. If you are not sure, check before you exit.
JQL mode
Type JQL to switch. This is closer to the T24 JBASE-style operations you may already know:
COUNT FBNK_CURRENCY
LIST-ITEM FBNK_CURRENCY WITH RECID = 'GBP'
COPY FBNK_CURRENCY FBNK_CURRENCY_BACKUPUse JQL when working with T24 files directly rather than underlying database tables.
The 200-row limit
SQL SELECT results are capped at 200 rows by default. In TAFC you may have been used to getting everything back. Here you will not, and there is no warning — it just stops at 200.
To change this, type setup inside DBTools and edit the Max Row Retrieved (SQL) setting. The change is stored in the DBTools properties file.
Be careful with this on a live system. Set it high for testing, return it to something sensible for BAU.
Script mode
DBTools can run a query without opening the interactive console — useful for scheduled checks or quick one-offs:
DBTools -u <username> -p <password> -s SQL SELECT RECID FROM FBNK_CURRENCYNote: SELECT * needs the * escaped in script mode:
DBTools -u <username> -p <password> -s SQL SELECT \* FROM FBNK_CURRENCYLog the output to a file with -log:
DBTools -u <username> -p <password> -s -log currencycheck SQL SELECT \* FROM FBNK_CURRENCYLog files appear in TAFJ_HOME/log with a .log extension.
JED — direct record editing
JED is the record editor built into DBTools. Open a record with:
JED FBNK_CURRENCY GBPOnce open:
- Type a field number to edit that field
i <field number>to insert a fieldd <field number>to delete a fieldcto cancel pending changes
JED supports multi-values and sub-values using field.mv.sv notation. i 3.3 inserts a third multi-value in field three.
Use JED carefully in production. Changes are direct database writes — no T24 application layer, no validation, no audit in the normal T24 sense. Powerful and dangerous in equal measure.
The workflow difference
| Task | TAFC | TAFJ |
|---|---|---|
| Check a record | SELECT in T24 command line | SSH → navigate to TAFJ_HOME/bin → launch DBTools → switch mode → query |
| User credentials | Your T24 login | Separate DBTools account via tUserMgnt |
| Result rows | All rows returned | 200 by default, configurable |
| Data changes | Immediate | Require explicit COMMIT |
It is more steps. It also requires a separate set of credentials that someone has to set up and manage. The mitigation is preparation: set up DBTools users before go-live, make sure everyone who needs database access has working credentials and has actually run a query in the TAFJ environment before the cutover date. Do not let this be the first time someone uses DBTools in production, during an incident, under pressure.
Quick reference
| Task | Command |
|---|---|
| Launch DBTools | DBTools -u <user> -p <pass> -cf <config>.properties |
| Create a user | tUserMgnt --Add -u <user> -p <pass> |
| Reset a locked user | tUserMgnt --Reset -u <user> -p <pass> |
| Switch to SQL mode | SQL |
| Switch to JQL mode | JQL |
| Count records | COUNT <FILENAME> |
| Commit a change | COMMIT |
| Change max rows | setup → edit Max Row Retrieved |
| Open a record | JED <FILENAME> <RECID> |
| Script mode | DBTools -u <user> -p <pass> -s SQL SELECT \* FROM <TABLE> |
| Navigate results | f forward, b back, sr right, sl left |
| View history | history |
| Re-run last command | h1 |