Professional Documents
Culture Documents
My t24 Quetions
My t24 Quetions
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.
F.READ needs a valid T24 file name, a file descriptor variable and a record ID to operate.
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.
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.
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.
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
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"
or alternatively:
CALL SC.FORMAT.CCY.AMT(LCCY,AMT)
*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:
Dates Manipulation
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'
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
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
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
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:
* functions A, R or D)
* Outgoing parameters:
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.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.
1) Eb.Phantom started
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
16.17 COLUMN.........
17.17 LENGTH.MASK....
22.17. 1 GB FIELD.LBL