You are on page 1of 17

jBASE BASICS

What is F.READ?

F.READ is a T24 core API that facilitates read operation of a record from a file into a dynamic array.

What are the prerequisites of using F.READ?

F.READ needs a valid T24 file name, a file descriptor variable and a record ID to operate.

Isn't it necessary to use OPF before using F.READ?

No. It is not necessary call OPF to open a T24 file before using F.READ. This is because, F.READ internally
calls OPF in case the required T24 file name is not open.How ever, it is a common practice to use OPF to open
files manually.

Does F.READ hold a lock?

F.READ does not take any sort  of database lock. F.READ should be used only when the application intends to
read contents of a record of the file and not update it immediately. If an update is sought after read, F.READU
should be used instead.

Does F.READ cache the results?

Yes. Any record read through F.READ is cached for any subsequent calls to read the same record from the same
file. The cache is valid only until the transaction is complete. Once the transaction boundary has crossed, cache
expires.
How reliable is the cached result from F.READ?

Since, the cache is a transactional cache, it is up to the application to rely on the cache. If only a read operation
is what is required, F.READ can be used.
How does F.READ behave during COB?

During COB, F.READ is designed to read records directly from database and not make use of any cache. For
this reason, the record routines in multi-threaded processing make use of CACHE.ON to make use of cache
exclusively. The cache will be active within every single call to record routines by the agents.

An example of a scenario where F.READ can be used?


To check if an account belongs to a customer, a read to the file CUSTOMER.ACCOUNT can be performed
using F.READ.
An example of a scenario where F.READ should not be used?
After a loan transaction, in case of an update to the account balance, F.READ should be avoided since we intend
to update the file immediately after a read.
Usage

F.READ (File Name, Key, Record, File Variable, Error Message)


 
Input:
 
File Name – File name.Key -  key to the record
File Variable – Opened file path

output:
 
Record – The dynamic array of the record that is being read. Null value in case the record does not exist.
Error Message -  Error messages such as ‘RECORD NOT FOUND’ in case the read encounters an error.
Read an History file with a Live key

Use the program EB.READ.HISTORY.REC to read the history file. You take the livekey, and the program
will return the last History record as well as fills the Record from History.
Example :
CALL EB.READ.HISTORY.REC(FN.EFG.FUTURES$HIS,RECORD.ID,R.EFG.FUTURES$HIS,'')
Note: after this call, RECORD.ID will contain the last History Key (XXXXXXXXX;YY)

COMMON VARIABLE

R.COMPANY(x)    = Record COMPANY profile


R.DATES(x)      = Record DATES
R.NEW(x)        = Record NEW
R.NEW.LAST(x)   = LAST Record NEW
e.g. important for pgm. DATA.CAPTURE to update batch totals when changing an not authorised record
R.NEW(V+1)      = Field no.s which are defaulted
Storage by using 'AF:".":AV:".":AS' (= e.g. '14..' or '15.1.' or '16.1.1')
VM = Fieldmarker
R.OLD(x)        = Record OLD
resp. Record 1 + 2 when displaying History records
- similar to ID.NEW, ID.OLD
R.USER<x>       = Record USER profile
R.VERSION       = Record VERSION when pgm.selection with ',' and
version no. (or only ',')
- realized with pgm. VERSION

VM = Fieldmarker when more than one field defined


T.REMTEXT(x)    = Table with REMark TEXT
used for miscellaneous display e.g text 'OVERRIDE' in pgm. OVE
see pgm. SIGN.ON for updating (hardcoded or by text-record in conncection with language code)
A               = (Attached) Field no. within a sequence
AF              = (Attached) physical Field.no within a sequence
Example: Field no.s are 1, 2, 3, 4, 5
When record will be authorised and field no. 3 and 4 are empty and therefore not displayed
A-sequence is 1, 2, 3 but AF-sequence is 1, 2, 5
= '' when remark line
ANY.INPUT       = "" = no input was done
= 'Y' = input was done (used if override 'YOU
RETURN AND MAY LOSE INPUTS' necessary)
APPLICATION     = Name of APPLICATION
AUTH.NO         = No. of Authorisers (1 or 2)
defined in USER- (standard) or VERSION-record
AUTH.QUALITY    = Digit 1 = O = no allowance as 1st authoriser
= X = allowed as a 1st authoriser
Digit 2 = O = no allowance as 2nd authoriser
= X = allowed as a 2nd authoriser
depending on user profile
= 'E' when Exception list will be displayed for
special OVERRIDE.CLASSes
AS              = Sub value field no.
Example: Field no. = 3.1.5 = Value
AF = 3, AV = 1, AS = 5
AV              = multi Value field no.
Example: Fields to be displayed are no. 1, 2, 3.1 (first subfield), 3.2 (2nd subfield), 5 Values of A, AF, AV are
within 1st line: A = 1, AF = 1; AV = ""
within 2nd line: A = 2, AF = 2; AV = ""
within 3rd line: A = 3, AF = 3; AV = 1
within 4th line: A = 4, AF = 3; AV = 2
within 5th line: A = 5, AF = 5; AV = ""
(AS in this example always 0)
= value number of R.VERSION(EB.VER.TEXT) for AF = ''
when Single mode
C               = Column (no.)
CLEAR.SCREEN    = "" when lines 4 resp. L1ST - 19 are cleared
= 1 = not cleared
= 2 = line 20 contains last SIGN.ON data
COMI            = COMmon Input variabel
Standard input is only in pgm 'INP' and Input is transferred with COMI
COMI.DEFAULT    = 1 = COMmon Input was DEFAULTed
= 0 or "" otherwise
COMI.ENRI       = COMmon Input ENRIchment
preliminary value for T.ENRI, will be transferred to T.ENRI at the same time COMI is moved to R.NEW
CONTROL.MODULO  = 0
= 1 = large files (Override required when SELECTing)
CONTROLWORD.OK  = "" = No Controlword keyed in = Normal input stored in
Variable COMI
= 'Y' = Any Controlword keyed in = Stored in variable COMI
For the advantage to have this variable look for
instance to the pgm. FIELD.INPUT
C$.UNIVERSE.RELEASE - uV release level (from RELLEVEL VOC)
DISPLAY         = update of COMI
E               = Error message
ECOMI           = in case of Error COMmon Input to be displayed
= original input without any conversion or mask
END.ERROR       = "" = No Error occured
= 'Y' = Error occured, Validation not possible
= '#f', '#f.v' or '#f.v.s'
(f=field, v=multi value, s=sub value)
when error refers a not defined field
(possible in strange situations)
ETEXT           = Error TEXT
When input was in SINGLE.MODE then ETEXT will be stored in T.ETEXT and displayed in connection with
the whole page
When input was in MULTI.MODE then ETEXT will be transferred to E and immediately displayed in last line
FULL.FNAME      = FULL FileNAME = Name includes company abbreviation
(if there is any - e.g. FDH.CUSTOMER)
FUNCTION        = A, B, C, D, E, F, H, I, L, P, Q, R, S, V = possible
- see special description (also declared as V$FUNCTION)
HIST.NO         = ID of History record (ID, ';', CURR.NO)
Used when displaying History records to be able to go forward and backward with controlwords
ID.ALL          = "" = not used
= 'Y' = using 'ALL'-option: Authorising, deleting or reversing all ID's (up to now only used for
DATA.CAPTURE)
= 'B' or 'Y' = Validation with or without Authorising
Fast-input-records, when using B-Function
('B' = run in back-, 'Y' in foreground)
ID.AUT          = 0 = no problem
= 1 = calling ERR will be switched to calling REM
(otherwise no chance to see error message)
ID.ENRI         = ENRI-paramater of ID - see T.ENRI
ID.ETEXT        = ETEXT-paramter of ID - see T.ETEXT
= "" = not used
= '+' = new Id = next after last one
= '-' = new ID = ID before last one
ID.CHECKFILE    = CHECKFILE-parameter of ID - see CHECKFILE(x)
ID.COMPANY      = ID of COMPANY-record (R.COMPANY)
ID.CONCATFILE   = 'AL' = ID is left adjusted
= 'AR' = ID is right adjusted
ID.F            = F-parameter of ID - see F(x)
ID.N            = N-parameter of ID - see N(x) - but 3rd field ('C')
not used
ID.R            = R-parameter of ID - see R(x)
ID.T            = T-parameter of ID - see T(x)
ID.NEW          = ID of NEW record, e.g. last input
ID.NEW.LAST     = LAST ID of NEW record
normally the same value like ID.NEW only after entering a new FUNCTION, ID.NEW.LAST is "" and
ID.NEW is still unchanged
(ID.NEW may be used for C-Function, but ID.NEW.LAST
= "" means that there is no ID for protocol line or as a base for displaying more records when SCREEN.MODE
is multi)
ID.OLD          = ID of OLD record, e.g. after new input
- in case of displaying History records
ID.NEW and ID.OLD = the IDs of the two records
ID.POINTER      = used in connection with MULTI.MODE when automatic sequence
Digit 1 = 'A' = after displaying a full page continuation has to be signaled in action line
= '_' = normal processing
Digit 2 = 'F' = display forward (ascending)
= 'B' = display backward (descending)
INPUT.BUFFER    = Input in advance = possible in action line
Input in action line may contain several inputs divided by a blank Pgm. 'INP' looks at first to INPUT.BUFFER
and takes this char. instead of waiting for an input
L               = Line no. '0...23'
may be calculated 'L = MOD(A-1,20-L1ST)+L1ST' and - also often used - when calculating next page 'NEXTP
= INT((A+19-L1ST)/(20-L1ST))'
L.MULTI         = In MULTI.mode starting Line no.
e.g. Input in MULTI.MODE requires 3 Lines then L.MULTI = 4, 7, 10, 13, 16
L1ST            = 1ST available Line no. in accordance to LEVEL
= line no. 4 for 1st Level, 8 for 2nd one etc.
LANG.NO         = The current language number being processed when entry is made into a language field. i.e
F(x) = "XX.LL"       - LANG.NO = AV
F(x) = "XX.XX.LL"    - LANG.NO = AS
APPLICATION = "STATIC.TEXT" "DYNAMIC.TEXT" - LANG.NO = AF
Other case LANG.NO = ""
LASTA           = Last field no (A)
e.g. in the example with AF V = 5 but LASTA = 3
LASTL.MULTI     = In MULTI.mode required line no.s -1 e.g. LASTL.MULTI = '2' = 3 lines are handled
LASTP           = LAST (highest) possible Page no.
e.g. 20 fields = V = 20, LASTP = 2
or 'LASTP = INT((V+19-L1ST)/(20-L1ST))'
LCCY            = Local CurrenCY from COMPANY record
LEVEL.NO        = LEVEL NO. = 0 = Level before SIGN.ON (Terminal start)
= 1 = Normal work
= 2..4 = 'LEVEL DOWN' with possibility to LIST and/or
SEE misc. records and to return to 'LEVEL UP'
LEVEL.STATUS    = "" = normal work
= 'UP' = pgm. returns from 'LEVEL DOWN'
LIVE.RECORD.MANDATORY = 0
= 1 when input of an id in RECORDID.INPUT with a
FUNCTION 'C', 'F', 'I' or 'T' and PGM.TYPE '.IDO'
and ID.NEW not calculated by GET.NEXT.ID routine
(In this case the record mustn't be a new one).
LNGG            - LaNGuaGe code from USER record
LOCAL.REF.FIELD = "" resp. FIELD number with LOCAL REFerences
(defined by F(x) = 'XX.LOCAL.REF')
MESSAGE         = transfers MESSAGEs between pgms
e.g. 'REPEAT' or 'AUT' or 'VAL'
MTHPOS          = MonTH POSition from USER record (defines position of month within input - DDMM or
MMDD)
MULTI.POSSIBLE  = "" = record has no subfields
pgm is in some cases faster for some values can be calculated in advance (without reading records)
= 'Y' = record may contain subfields
OPERATOR        = Name of inputter or authoriser or any operator
OPF.NO          = OPened Files current NO. = pointer 1...99 for T.OPF
P               = Page no.
PGM.TYPE        = 'A' = special programs, e.g 'EX'
for more information see pgm. PGM.TABLE
= 'H' = 3 Files will be handled
e.g. 'F.COUNTRY', 'F.COUNTRY$HIS', F.COUNTRY$NAU
= 'L' = Life file only
(similar to TABLE automatically updated)
e.g. 'F.PROTOCOL' or 'F.LOCKING'
can be handled with function L, P, S only
= 'T' = automatically updated file in connection
with CONCATFILE(x)
e.g. 'F.MNEMONIC.CUSTOMER'
can be handled with function L, P, S only
= 'U' = no History-file
e.g. 'F.VERSION', 'F.VERSION$NAU
PGM.VERSION     = VERSION id of ProGraM
= ',' + number or ',' only realized with pgm. VERSION
PHNO            = "" = no phantom run (normal foreground)
= 'nn' = number of task (TNO, terminal, vdu) starting this phantom run
PREFIX          = first char. to have an unique ID when adressing
field numbers by EQUATE (e.g. used by pgm. FILE.LAYOUT)
PRINTER.STATUS  = "" = not open (Close)
= "OPEN"
RETURN.COMI     = Input when '!'-Function started on a field.line
SCREEN.MODE     = 'SINGLE' = Input line by line
= 'MULTI'  = Multiple inputs within a line
MULTI.MODE can be defined by pgm. VERSION
SCREEN.TITLE    = Name of application (+ PGM.VERSION, + FUNCTION)
for display only (according to language code)
TEXT            = similar to MESSAGE
TIME.STAMP      = TIMEDATE()
to use an unique time, when e.g. authorising more than 1 record at the same time
TNO             = Terminal NO. (Task number, Wire connection no.) resp. User no. (including Phantoms)
TODAY           = TODAYs date (R.VERSION field 1)
TODAY.VERSION   = VERSION of TODAYs run (R.VERSION field 2)
TTYPE           = Terminal TYPE (Task type, Hardware type) e.g. 'TV924', 'TV950', 'EBS-GUI'
V               = Volume = Highest (in pgm. defined) field no.
VAL.TEXT        = TEXT to be displayed after VAlidation
first blinking, then displayed with half intensity

TEMPLATES
Stereotypes
There are three stereotypes to choose from depending on the type of application program:
Application
(H or U)
Used for all standard input programs to maintain a live, unauthorised and history file. This
template is also used for type ‘U’ programs that have a live and unauthorised file but do not have a
history file.

Display (L)
Used for the display of a 'non-inputtable / live’ file

Utility (W)
Used to allow standard input without an unauthorised file and the verify function to execute
special procedures

Compared to standard RDBMS, T24 applications (or table) have their structure hard-coded. Who said   ??!
Fields definitions relates to the dictionary of the application (table). It contains all the field data types and
specific rules attached to every single field.
If you create a new table (or application), you will have to
– either add an attached program that contains all the field’s definitions (using a CALL
<your.table>.FIELD.DEFINITIONS in the label “DEFINE.PARAMETERS:” if you’re using a standard
template)
– or include those in the main program (still positionned in the label “DEFINE.PARAMETERS:” if you’re
using a standard template).
A field is defined by specific variables named F, N, T.
Field content can be controlled by a list of values using CHECKFILE.
In field definitions programs (or label), fields are not identified by their field numbers as displayed in T24 by
end-users. Field numbers are the result of a variable increment, commonly named “Z“. You will then find fields
definitions prefixed with a “Z+=1”, and related definitions common variables F(), N(), T() will appear
as F(Z), N(Z), T(Z). Variables N() and T() refers to the main display core program named “IN2“.
For a full description of all other common variables, see this page.
The F(x) common variable
Contain a maximum of 18 characters to define a field name.
Example : Z+=1 ; F(Z) = “FX.PIP.TYPE” ; N(Z) = “11..C” ; T(Z) = “” ; T(Z)<2> = ‘PERCENTAGE_PIPS’
‘XX.LL.’ and – 12 char. field description when multivalue field in connection with language code e.g.
‘XX.LL.DESCRIPTION’
‘XX.’ and – 15 char. field description when multivalue fields (sub fields) used e.g. ‘XX.REMARKS’
‘XX.LOCAL.REF’ will (via LOCAL.REF.FIELD) relate to the files ‘LOCAL.REF.TABLE’ and
‘LOCAL.TABLE’ and replaces F(x), N(x), T(x) by users definition
When no definition then T(x)<3> = ‘NOINPUT’
‘XX<‘, ‘XX-‘, ‘XX>’  and – 15 char. field description when associated multi value fields
‘XX<‘ = first association
‘XX-‘ = next (if not last)
‘XX>’ = last association
Example:
2 fields No. 3 + 4 are multi value fields and both have 2 lines:
Case ‘XX.’ sequence = 3.1, 3.2, 4.1, 4.2
Case ‘XX>’ etc.     = 3.1, 4.1, 3.2, 4.2
‘XX.XX.’, ‘XX.XX.LL’, etc. = like before with sub fields
 
The T(x) common variable
This variable defines the data type of a field. All types are using by default a display program named “IN2”.
When T(Z) is not null (T(Z) = “xxx”, this means the field type is described in a specific program, implicitly
prefixed by “IN2” (thus named “IN2xxx”).
Further parameters can be added either to the “IN2” (when T(Z) is null) or the the “IN2xxx” when T(Z) =
“xxx”. You can find expected parameters in the header of all “IN2” types programs.
Example:
Z+=1 ; F(Z) = “FX.PIP.TYPE” ; N(Z) = “11..C” ; T(Z) = “” ; T(Z)<2> = ‘PERCENTAGE_PIPS’
Here T(Z) is null which means standard “IN2” display type should apply.
T(Z) = “” means T(Z) = “IN2”, then possible parameters are defined in IN2 program.
T(x)            = 8 Fields possible (delimiter = <f>):
– Field 1
= “” = numeric or Input Table
= ‘.ACCD’ = combination of a) ‘ACC’, b) ‘/’, c) ‘D’
= ‘.CCYD’ = combination of a) numeric, b) ‘CCY’, c) ‘D’
= ‘.D’ = combination of a) numeric, b) ‘/’, c) ‘D’
= ‘.YM’ = combination of a) numeric, b) ‘/’, c) ‘YM’
= ‘A’ = alphanumeric char. = ‘A…Z’, ‘a…z’, ‘0…9’, ‘ !”#$%&'()+,-./[\]`’
= ‘AA’ = like ‘A’, but 1st char. must be ‘A…Z’ resp. ‘a…z’
= ‘AAA’ = possible char. only ‘A…Z’ resp. ‘a…z’
= ‘ACC’ = 2-16 numeric char. incl. checkdigit or 3-10 char. ‘MNE’-type (will be converted to
ACCOUNT.NUMBER)
= ‘ALL’ = any account no. – ‘ACC’ resp. ‘ANT’ or ‘INT’
= ‘ALL’ = same input like ‘ACC’ or 6-12 alphanumeric char. INTERNAL.ACCOUNT.NUMBER
= ‘AMT’ = amount input
= ‘ANT’ = same input like ‘ACC’ or 6-12 alphanumeric char. INTERNAL.ACCOUNT.NUMBER
= ‘COM’ = alphanumeric char. (see pgm. COMPANY.CODE) or 1-5 char. ‘MNE’-type (will be converted to
COMPANY.CODE)
= ‘CUS’ = 1-6 numeric char. or 3-10 char. ‘MNE’-type (will be converted to CUSTOMER.CODE)
= ‘D’ = Date char.
internal format always YYYYMMDD (Y=year, M=month, D=day), but input may be ‘D’, ‘DD’, ‘DMM’ resp.
‘MDD’ (when R.USER defines ‘MMDD’-input), ‘DDMM’ resp. ‘MMDD’, ‘DMMYY’ resp. ‘MDDYY’,
‘DDMMYY’ resp. ‘MMDDYY’, ‘YYYYMMDD’
and: ‘MM’ may be inputted with 3 char. month’s name
(in accordance to language table TEXT.MONTH)
< 8 char. are updated with TODAY (today’s date)
– caution in connection with USER-record and check by computer date !)
‘YYYY’ = ‘1950…2049’
= ‘FNO’ = Field no. (may include value and sub no.)
= ‘FQU’ = date + FreQUency code
default date = today’s date transformed to next frequency date
Input of a date not in accordance to frequency (e.g. ‘1984-11-01 TWMTH’) will be accepted for the date may be
the last one of another frequency and new frequency works first time after this date
Frequency codes are:
‘DAILY’ – Input may be ‘D’ only = next frequency date = next day
‘WEEKn’ (n = 1…9)
– Input may be ‘Wn’
– Input ‘W’ only = ‘WEEK1’
= next frequency date = in n weeks
‘TWMTH’ – Input may be ‘T’ only
= next frequency date = the ultimo date or the 15th of next month
‘Mnndd’ (nn = 01…99 = number of months, dd = 01…31 = day)
= next frequency date in n months (+ day definition)
(e.g. M0131 = every month on ultimo)
= ‘INT’ = 6-12 alphanumeric char. or
3-10 char. ‘MNE’-type (will be converted to INTERNAL.ACCOUNT.NUMBER)
= ‘MNE’ = MNEmonic field =
char. ‘0…9’, ‘A…Z’, ‘.’
= ‘PG’ = ProGram name or abbreviation (will be converted to full name)
= ‘PV’ = like ‘PG’ with possible using of Version
– more informations about PGM.TYPE in PGM.TABLE
= ‘R’ = (normally) 10 numeric char., but only up to 6 integer and 9 decimal char.
= ‘S’ = SWIFT char. =
‘A…Z’, ‘0…9’, ‘ ‘()+,-.’
‘-‘ can’t be the 1st char.
= ‘SS’ = like ‘S’, but 1st char. ‘A…Z’
= ‘SSS’ = all char. must be ‘A…Z’
= ‘YM’ = Year and Month
internal format always YYYYMM (Y=year, M=month) but input may be ‘M’, ‘MM’, ‘MYY’, ‘MMYY’,
‘YYYYMM’
– Field 2 – See IN2… pgms.
– Field 3
= “”
= ‘EXTERN’ in field 3 = automatically updated field (in connection with other pgms)
= ‘NOCHANGE’ in field 3 = field content can only be inputted in accordance with a new record (or very first
record is not authorised)
= ‘NOINPUT’ in field 3 = indirectly updated by input of another feld (e.g. ievery input changes the fields
RECORD.STATUS, DATE.TIME etc.)
= ‘NV.EXTERN’ in field 3 = same like ‘EXTERN’ but
Not Visible (No display when displaying record)
– Field 4 = “” or Mask
– Field 5 = “” or ‘R’ = Right justified DISPLAY
– Field 6 – not described yet
– Field 7 = Fields to be deleted when containing
– Field 8 = Can be set to the following values :-
‘NOMODIFY’ – No changes allowed to association
‘NODELETE’ – No deletion allowed to association
‘NOEXPAND’ – No expansion allowed to association
The value must be specified for the first field
in the association.
default figures after input of this field
VM = Fieldmarker when more than one field defined
 
The N(x) common variable
Define the numbers of characters + a code for special check. 3 Fields (delimiter = ‘.’) :
Field 1 = Maximum characters – Leading char. ‘0’, ’00’. ‘ ‘ = special meaning (see following examples)
Field 2 = Minimum characters
Field 3 = “” or ‘C’ (= special Check in main pgm. -return from pgm. FIELD.INPUT resp. FIELD.MULTI after
input to this field)
Examples:  
’35’ = input up to 35 characters possible
‘35.3’ = input from 3 to 35 characters
’01’ means: no input or digits ‘0…9’ – ‘0’ is a valid input and won’t be cancelled
‘006.6’ = input of 6 characters including zero (minimum ‘000000’, maximum ‘999999’)
‘ 54’ = blanks won’t be cancelled (no use of TRIM)
‘3.1.C’, ’16..C’ = any combination with ‘C’-option
 
The IN2 Standard display program
This program receives two parameters: (N1, T1) and returns:
COMI = may be modified
DISPLAY = masked COMI
N1
a) Number of maximum char. (including mask char.),
b) ‘.’,
c) Number of minimum char.
T1
Field 1 = “” = Numeric Input or Specified Input by Table
Field 2 =
a) Numeric
Value 1 = “” or ‘-‘ (=when Minus possible)
Value 2 = “” or ‘1…9’ (=possible Decimals)
b) Table
ba) by ‘…’, e.g. ‘1…35’ or ‘B…D’
bb) by ‘_’, e.g. ‘NO_Y’ or ‘R_’
Field 4 = “” or Mask, e.g. ‘R##-###’ for Category
Field 5 = “” or ‘R’ (when right adjusted)
or ‘C’ (= ‘R’ + Converting space to zero)
CHECKFILE(x)
Looks for available ID and brings enrichment resp. error message back from pgm. DBR
Field 1 = file name (without ‘F.’)
Field 2 = field number
Field 3 = miscellanous arguments (delimiter = ‘.’)
a) “” or ‘L’ = take value field in accordance to language code
b) not used
c) not used
d) delimiter argument, e.g. ‘YM’
Examples of often used defintions: “L”, “L…YM”
Field 4-6 = next squence, etc.
when using 2 definitions (or more)e.g. ‘ACCOUNT<f>CUSTOMER<f><f>CUSTOMER<f>SHORT.NAME’
CONCATFILE(x)
FILE to build a CONCATenation Subfield 1 = ‘AL’ = Table is left adjusted = ‘AR’ = Table is right adjusted =
‘NEW’ = Only 1 concatenation is possible (e.g. Mnemonic must be unique) Subfield 2 = File name (without
‘F.’)
* Set field NOINPUT and expand, delete restriction on multivalue fields
T(EB.GER.FIELD.1) = ""
T(EB.GER.FIELD.1)<3> = "NOINPUT"
T(EB.GER.FIELD.1)<8,1> = "NOEXPAND"
T(EB.GER.FIELD.1)<8,2> = "NODELETE"

 Rounding an amount according to pre-set formats:


FMT(number, format)
Example:
Y.VAR = "8" : VM : "12"
FMTS(Y.VAR,"R2")
=> gives Y.VAR = '8.00':VM:'12.00'
 Rounding an amount according to currency definition:
CALL EB.ROUND.AMOUNT(CCY,CURRENCY.AMT,param,””)
=> param: ‘1’ = non-cash rounding ‘2’ = cash rounding

 or alternatively:
CALL SC.FORMAT.CCY.AMT(LCCY,AMT)
 

 Fill a number with zeros and a fixed lengh:


#n: Spaces. Repeat space n times. Output value is overlaid on the spaces created.

*n: Asterisk. Repeat asterisk n times. Output value is overlaid on the asterisks created.

%n: Zero. Repeat zeros n times. Output value is overlaid on the zeros created.

&x: Format. x can be any of the above format codes, a currency symbol, a space, or literal text. The first
character following & is used as the default fill character to replace #n fields without data. Format strings are
enclosed in parentheses “( )”.

For instance you need to fill a number 12345 with zero in front for a fixed lengh of x digits:

FMT(12345, “R0%10”) => gives ‘0000012345’


FMT(12345, “L0*10”) => gives ‘12345*****’

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]: ':' : CURRENT.TIME[7,2]
* will give a time of "18:51:00" for instance.

 Date formatting:
CALL DIETER.DATE(DATE.IN,DATE.OUT,’D’)
Example:
ORD.DATE = R.DXO<DX.ORD.TRADE.DATE>
(for instance= '20151106')
ORDER.DATE = ''
IF (ORD.DATE) THEN CALL DIETER.DATE(ORD.DATE,ORDER.DATE,'D')
=> gives ORDER.DATE = '06 NOV 2015'

 Compute a difference between 2 dates:


CALL CDD(YREGION,START.DATE, END.DATE, DAYS.DIFF)
With DAYS.DIFF set to W for a difference in working days, C for a difference in calendar days. After the
call, DAYS.DIFF will contain the days difference.
Example:
REMAIN.CAL.DAYS = "C"
START.DATE = TODAY
IF START.DATE < EXPIRY.DATE THEN
CALL CDD('',START.DATE, EXPIRY.DATE, REMAIN.CAL.DAYS)
END
=> gives REMAIN.CAL.DAYS = 115

 Derive a date by adding or subtracting a number of days:


CALL CDT(YREGION,YDATE, YDAYS)
With:
YREGION only necessary when calculating working days
YDATE= YYYYMMDD
YDAYS: number without (= ‘+’) or with ‘+’ or ‘-‘ sign in front and without (= ‘W’) or with ‘W’ (= Working days to be
calculated) or ‘C’ (=Calender days to be calculated) at the end.
Definition may be multiple: e.g. ‘+02W03C’ or ‘+10W-3C’
Example:
if TODAY = 20140606
        PROCESS.DATE = TODAY
        DAY.COUNT = "-3W"
        CALL CDT('', PROCESS.DATE, DAY.COUNT)

=> gives PROCESS.DATE = 20140603

  Check if a day is open or a banking holiday


Example with “date_to_check” which can be the next open day if it’s a banking holiday:

COUNTRY.CODE = ''              
COUNTRY.CODE = R.COMPANY(EB.COM.LOCAL.COUNTRY)
RETURN.CODE = ""               
CALL WORKING.DAY('',date_to_check;,'','','',COUNTRY.CODE,'','',RETURN.CODE,'')
IF RETURN.CODE = 0 THEN
(...)
END ELSE
ADJ.MAT.DATE = date_to_check
CALL CDT('',ADJ.MAT.DATE,'+1W')
(...)
END                         

VERSIONS

Trigger Routines

ID.ROUTINE :- is called after inputting the record-id and before the read to file
CHECK.REC.RTN:- is called after the read and before building the screen
AUTO FIELD ROUTINE:
VALIDATION ROUTINE:  every time that the value on the field was changed. Please remember that in
browser env, this routine could be executed as HOT.FIELD or in "validation stage" (when all record is
processed)
INPUT.ROUTINE: every time the user executes COMMIT command. (When the record was called on I,D,R
function). Before the database commit was called. On browser, this routine is also executed when the user
applies "Validate" action
AFTER.UNAUTH. WRITE :- is called after the write to $NAU

BEFORE.AUTH.RTN: is called just before the write to live file


AUTH.ROUTINE: every time a record is authorized, and after the database commit was done. This means,
that this event is not part of the transaction.

VERSION.CONTROL
To link VERSION to VERSION.CONTROL, make sure field EXC.INC.RTN is set 
to YES.
GET LOCAL REF POSITION IN VERSION
R.NEW(LOCAL.REF.FIELD)<1,LOCAL.REF.POSITION>= value
CALL GET.LOC.REF(SL.FILE.NAME,"GRADE",Y.GRADE.POS)

R.NEW(SL.LN.LOCAL.REF)<1,Y.GRADE.POS> = "AAA"

CALL REBUILD.SCREEN

COB
It happens in the Application Stage (A) in the Batch subroutine EB.CYCLE.DATES. A another Date change
also happens in the Start of Day Stage (D) in the batch subroutine B.DATE.CHANGE.

COB STAGES

Stage Description of activities


APPLICATION Individual application processes (Forex, Funds Transfer, etc.)
SYSTEM WIDE System wide processes (Interest and Charges, Revaluation, etc.)
REPORTING Main system reports (Trial Balance, General Ledgers, etc.)
Change date (Standing Orders, split month end events, cash flow
START OF DAY maintenance, etc.)
Any non critical reports and processes that can be run after the
ON LINE system has returned to on line mode.

OFS
Defines the type of communication used to exchange data with this service.
OFS allows communication through a BATCH process where a directory is populated with records in
either a particular file, or several files. When combined with the OO module, single messages may be
passed to T24 through a TELNET connection. Records can be created in a T24 program or sub-
routine using the T24 setting, whilst the new T24 broswer uses the SESSION option.
BATCH
A Batch connection will usually run as a background Phantom task initiated by the EB.PHANTOM
application.
This will examine a specified directory (the IN.QUEUE.FILE), either checking for a specific file
(IN.QUEUE.NAME) or checking the entire directory for files to process. Each file may contain
multiple records. The processed records will be written to the out directory (OUT.QUEUE.FILE),
either to a specific file (OUT.QUEUE.NAME) or a file with the same name as the inward file.
The batch connection will support GTS syntax messages or OFS syntax messages.
TELNET
The Telnet connection allows for messages to be passed using a simple communication mechanism.
Each message sent to OFS will be processed, the results will be returned to the external source. The
Telnet communication will be initiated automatically when the external source initiates a login using a
specific id, defined in the field LOGIN.ID.
The telnet connection will only accept OFS syntax messages and is only available when module OO
is installed.
T24
This is used when calls to OFS.T24.MANAGER are set up in the T24 programs or user subroutines.
SESSION
Used for new T24 browser
Validation Rules
Mandatory Input
Possible values are TELNET, BATCH, SESSION or T24

GTS MODES
MODE ERROR OVERRIDE
0 REJECT APPROVE
1 INAU REC TO HOLD APPROVE
2 REJECTED INAU TO HOLD
3 INAU REC TO HOLD INAU REC TO HOLD
4 HOLD IF TRANSACTIOIN HOLD IF
SUCCESS TRANSACTIOIN
SUCCESS

More Info GTS CONTROLS


empty : Overrides will be accepted by default.
Rejected if any error messages.

1 : Overrides will be accepted by defualt.


Put on hold if any error messages.

2 : Put on hold if any overrides.


Rejected if any error messages.

3 : Put on hold if any overrides.


Put on hold if any eror messages.

4 : If FIELD.VAL in F.OFS.SOURCE is set as null, then all the messages will pur on hold.
If FIELD.VAL in F.OFS.SOURCE is set as YES, then all the messages will be validated.
Success messages will put on hold. Error messages will be rejected
OFS CALLING ROUTINE:
OFS.BUILD.RECORD(APP.NAME,OFSFUNCT,PROCESS,OFSVERSION,GTSMODE,NO.OF.AUTH,TRA
NSACTION.ID,RECORD,OFSRECORD) for each record and stored the resulting OFSRECORD in a file
that you then copy over and load into your env.)

* Incoming parameters:

* - APP.NAME The application for which ofs will be invoked

* - OFSFUNCT The function (I,A,R or D)

* - PROCESS The OFS process (should be allways "PROCESS")

* - OFSVERSION The version used to input this transaction

* - GTSMODE The GTS.MODE to be used in this transction. This

* mode will overwrite the GTS.MODE set in the version

* - NO.OF.AUTH The number of authorisers to be used. This number

* overwrite the NO.OF.AUTH set in the version

* - TRANSACTION.ID The transaction id to be used. (mainly used with

* functions A, R or D)

* - RECORD The record in dynamic array format

* Outgoing parameters:

* - OFSRECORD The OFS record built from the incoming parameters

CALL OFS.POST.MESSAGE(OFS.MSG, MSG.ID,OFS.SRC.ID,OPTION)

CALL OFS.BULK.MANAGER(REQ,RES,CMT)
REQ - one or many OFS messages delimited by FM or by tags
RES - the corresponding replies delimited by tags
CMT - 0 or 1 wether a commit occured

OFS SOURCES ROUTINES:


OFS SOURCE basically can be called as online or batch.
If it is called as a batch process, this calls the OFS.QUEUE.MANAGER.

OFS.QUEUE.MANAGER inturn calls the OFS REQUEST MANAGER for each message. But as far as
BATCH processing is concerned, OFS QUEUE MANAGER is called by Phantom.

Here is the hierarchy....

1) Eb.Phantom started

2) Phantom initiates the OFS QUEUE MANAGER (OQM)

3) OQM calls QUEUE INIT ROUINE

4) For each message OQM calls IN MSG RTN

5) For each message OQM calls OFS REQUEST MANAGER (ORM)

6) ORM calls PRE MSG RTN

7) ORM hits the application

8) ORM calls POST MSG RTN

9) Returns back to OQM

10) OQM calls the OUT MSG RTN

11) Chek if there are any more messages

12) If not, Stops the Eb Phantom

13) OQM calls the QUEUE STOP RTN

OFS.SRC.QUEUE.INIT.RTN
Called only once from OFS.QUEUE.MANAGER. This routine will be triggered once the phantom is started.
No arguments will be supplied.

OFS.SRC.INITIAL.ROUTINE
Called only once from OFS.ONLINE.MANAGER. This routine is same as OFS.SRC.QUEUE.INIT.RTN but
at the online stage. No arguments will be supplied.

OFS.SRC.IN.MSG.RTN(IN)
Called for each ofs in message from OFS.QUEUE.MANAGER/OFS.ONLINE.MANAGER. This routine can
be used to do pre validation for the input message. The input message will be given as a single argument
and will be taken back.

OFS.SRC.MSG.PRE.RTN(IN)
Called for each ofs in message from OFS.REQUEST.MANAGER. This routine will called after validating
the given message is valid. The input message will be given as a single argument and will be taken back.

OFS.SRC.MSG.POST.RTN(IN)
Called for each ofs out message from OFS.REQUEST.MANAGER. This routine will be called after the in
message get processed.
OFS.SRC.OUT.MSG.RTN(IN)
Called for each ofs out message from OFS.QUEUE.MANAGER/OFS.ONLINE.MANAGER before the out
message written to out dir. This routine will be called after the in message get processed.

OFS.SRC.IN.DIR.RTN(IN)
Called for each ofs out message from OFS.QUEUE.MANAGER. This is same as
OFS.SRC.OUT.MSG.RTN. But this will be called after the message written to out dir.

OFS.SRC.QUEUE.CLOSE.RTN
Called only once from OFS.ONLINE.MANAGER. This routine will be triggered once the phantom is shut
downed. No arguments will be supplied.

OFS.CLOSE.ROUTINE
Called only once from OFS.ONLINE.MANAGER. This routine is same as OFS.SRC.QUEUE.CLOSE.RTN
but at the online stage. No arguments will be supplied.

ENQUIRY

14.17 FIELD.NAME..... IF.ARRFIG

15.17. 1 OPERATION... IF PD.PRINC.AMT GT 0 LD.AMNT

16.17 COLUMN.........

17.17 LENGTH.MASK....

22.17. 1 GB FIELD.LBL

14.17 FIELD.NAME..... ARRFIG

15.17. 1 OPERATION... F IF.ARRFIG

16.17 COLUMN......... 100

17.17 LENGTH.MASK.... 15R2,

22.17. 1 GB FIELD.LBL OutStanding Amount

14.18 FIELD.NAME..... TOT.ARR.FIG

15.18. 1 OPERATION... TOTAL ARRFIG


16.18 COLUMN......... 100,+1

17.18 LENGTH.MASK.... 15R2,

21.18 DISPLAY.BREAK.. B.DAONME

You might also like