Find below the list of common variables used in subroutines. They’re accessible as long as you include “$INSERT I_COMMON” in
Tag: Basic programming
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,
Fields Definitions
Compared to standard RDBMS, T24 applications (or table) have their structure hard-coded. Who said 🙁 ??! Fields definitions relates to the dictionary of
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)
FX Options Products
Introduction Options – Definition Options strategies ————————————————————————————- Introduction Derivatives markets or products are named ”Derivatives” because they are “derived”
Marché des Changes
MARCHE DES CHANGE Notions de base Certain / incertain Dans la plupart des pays, on cote les devises étrangères contre
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
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…