Find below the list of common variables used in subroutines. They’re accessible as long as you include “$INSERT I_COMMON” in
Category: T24 Technical Stuff
JBase / T24 Administration
The section of T24 OPERATIONS is as much important as the rest of the T24 Modules. During the COB/EOD -which
DEBUGGER
2 ways to invoke the debugger: launching debugger once a program is called and reaching a specific line number:
Update a record in live & history file during EOD/COB
Just an example of elements to include in a routine that update a record during the COB (end of day
Number(s) Formatting
First thing to note: native data is string in Jbase. So if you start with multiplying your data by 1,
Get Call stack history
In a routine, when you need to get information about the calling subroutine / program, or the routine which called
Function usage
JBase-Basic allows the definition of functions, like in any standard programing language. Benefit is that programs calling functions are much easier to read
LOCATE and FINDSTR functions
LOCATE Function When searching for a value in an array, you can use the common “LOCATE” function. You need to
Date Time Stamp
Various commands to manipulate date and time DATE() returns the system date, compared to TODAY which returns T24 date (banking date).
Fields Definitions
Compared to standard RDBMS, T24 applications (or table) have their structure hard-coded. Who said 🙁 ??! Fields definitions relates to the dictionary of
Dynamic array versus matrix
Within a jBase-Basic program, a data array can be represented as a Dynamic Array: – Used with array_name<datax> or alternatively
Write trace in a log file
Sometimes you need to add some program traces in a log file to understand more clearly what is going on.
“black belt” LIST command under Jbase
SQL: select left(value_date,6), count(*) from security_transfer where broker_no = ‘595701’and transaction_type like ‘F%’ and value_date like ‘2010%’ group by left(value_date,6)
Multivalued fields
Multivalued fields This is a very specific characteristic attached to the RDBMS included with GLOBUS / T24 ( Universe or
Create a new application, starting from a standard TEMPLATE
If the standard package is not enough for you, you can easily create a new application from scratch 🙂 Steps
Display messages to the user
Display a simple message Example of coding: TEXT = “Your input overrides tolerance of” TEXT := “<CR>” TEXT :” MAX.TOL
Example of a script launching an URL from a version
Example of SCRIPT Designer : LOAD.DX.LINK Dim sAppName Dim MyCommand Set oApp = Desktop.GetCurrentWindow sID = oApp.ID Select Case sID
JBase Programmer’s Guides
Programmers_Reference_Manual.pdf: Advanced Programmers Reference Manual.pdf :
How to modify the default enrichment of a field
(to be used in a version) STANDARD.SELECTION Create an I-desc that contains the new enrichment DX.CONTRACT.MASTER 15. 5 USR.FIELD.NAME. SHORT.NAME.SIZE
Validation routine in a Version
In a version, you can manipulate fields contents by using a validation routine. It is defined in a version using
Jbase Editor tips & tricks
Quit Editor after multiple select After a SELECT + EDIT / jed, to quit the editor: Escape !EXK + Return
Dates Manipulation
Get detailed date time information: * Time HH:MM:SS DD MMM YYYY CURRENT.TIME = TIMEDATE() CURRENT.TIME = CURRENT.TIME[1,2]: ‘:’ : CURRENT.TIME[4,2]:
Write directly a record in a table
WRITE “R.RECORD” TO “F.TABLE.NAME”, “RECORD.KEY” Example : FN.DX.MARKET.PRICE = “F.DX.MARKET.PRICE” F.DX.MARKET.PRICE = “” CALL OPF(FN.DX.MARKET.PRICE, F.DX.MARKET.PRICE) (…) WRITE R.DX.MKT.PRICE TO
Write properly a record in a table (CALL F.WRITE)
CALL F.WRITE (FN.TABLE.NAME, RECORD.ID, R.RECORD) Example : FN.FILENAME = ‘F.FILENAME’ ; FV.FILENAME = ” CALL OPF(FN.FILENAME, FV.FILENAME) R.RECORD<DX.CM.FIELD1> = ‘TOTO’
Build and fill in an array then retrieve data from it
Sometimes you will need to temporarily store data, before aggregation, cumul, re-order, etc… An array is the solution to perform
Read an History file with a Live key
Read an History file with a Live key Use the program EB.READ.HISTORY.REC to read the history file. You take the
Return a list of keys with a QSELECT
CALL EB.READLIST can also be used with a QSELECT. The QSELECT is selecting all fields from a table, not only
Return a list of keys after a SELECT (CALL EB.READLIST)
CALL EB.READLIST (SELECT.STATEMENT, KEY.LIST, LIST.NAME, SELECTED, SYSTEM.RETURN.CODE) Routine to return a list of keys from a select statement. Introduced to
Extract a range of keys after a CALL OPF(FOR NEXT, LOOP REMOVE)
Extract a range of keys after a CALL OPF Y.DATE = TODAY READ R.DX.DAILY.TRANS FROM F.DX.DAILY.TRANS,Y.DATE ELSE R.DX.DAILY.TRANS = “”
Manipulate the fields of a table (quick introduction)
All fields from a table are numbers, with an associated description. This association is set in libraries loaded by
Get a foreign data from a local table (CALL DBR)
Get a foreign data from a local table When you work with a table, you may need information stored in
Call a subroutine from an enquiry field
Call a subroutine Usage description: You can call a subroutine from an enquiry field. You have to invoke it using
Display the very first inputter of a record / a deal
Display very first inputter of a record 12. 7. 1 OPERATION… INPUTTER 13. 7 COLUMN……… 52 14. 7 LENGTH.MASK…. 28L
dates formatting
Example of date formatting in Enquiry 12. 3. 1 OPERATION… DATE.TIME 13. 3 COLUMN……… 35 14. 3 LENGTH.MASK…. 10L 15.
Compute the difference between two dates
You have first to convert the two dates to be compared to the julian format. 11.19 FIELD.NAME….. LAST.TRADE 12.19. 1
How to deal with selection fields in an enquiry targeting a Nofile
Selection fields in an enquiry targeting a Nofile If you need to give users the ability to filter the enquiry
Build an enquiry with a Nofile
Build an enquiry driven to a NOFILE When you can’t use standard conversion / calculation functions to get what you
Script Designer
Available objects List of available objects that can be used in the Globus Desktop SCRIPT.DESIGNER: As long as you’re using
I-Descriptors
I-DESCRIPTORS Purpose of I Descriptors (quick introduction) Some words on J-Descriptors IF Usage Multi-dimensional comparisons (IFS, EQS, GTS, MULS,… Make
Get a whole record, then extract multiple fields (CALL OPF, CALL F.READ)
CALL OPF, CALL F.READ
This is How Globus Works
This is How Globus Works…