UFT/FTI examples
The heart of the expanded addressing scheme represented by FARF4, FARF5, and FARF6 is the UFT/FTI. The UFT/FTI design uses a hierarchical technique for dividing very large amounts of file address space. A UFT points to several FTIs and each FTI potentially points to a split in the FACE table. The UFT and FTI are part of a file address. Together with a record ordinal number, a UFT/FTI combination specifies a file address in the database.
The UFTI parameter on the UFTFTI statement specifies a UFT followed by the FTI size. The FTI size specifies a length, in bits, of FTIs to be coded for a particular UFT. It is not the FTI itself. The UFT/FTI pairs coded on the UFTI parameter are used only for FARF4 and FARF5 addresses. The UFT/FTI pairs coded on the UFTI6 parameter are used only for FARF6 addresses.
UFTFTI UFTI=((3,8),(4,12)) specifies a slice
starting at UFT 3 comprising up to 256 (that is, 28) FTIs, and a slice starting at UFT 4 comprising 4096 FTIs. UFTFTI STAGE=FARF45,MODE=FARF5,
UFTI=((0,8),(1,12),(2,10),(61,16),(62,14),(63,12),
(20,23),(21,25)),
UFTI6=((2,10),(30,15)) - UFT 0 has an 8-bit FTI associated with it. This means there are 28 (256) UFT/FTI address pairs that may be used.
- UFT 1 has a 12-bit FTI associated with it. This UFT/FTI combination specifies 4096 UFT/FTI pairs.
- UFT 21 has a 25-bit FTI associated with it. This combination provides 33␠554␠432 UFT/FTI pairs.
- The UFTI6 parameter defines two UFT/FTI pairs 2,10 and 3,15. The same UFT can be used for FARF4/5 addresses as well as for FARF6 addresses.

Ellipses (…) in the figure represent the variable nature of the FTI.
RAMFIL TYPE=LSA,RECNO=00014,RECID=#APPOP,DUPE=YES,BAND=1616,
BASE=00800,UFTI4=(61,20),UFTI5=(61,21)The UFTI4 parameter states that the FARF4 address for record ID #APPOP has 61 as a UFT and 20 as an FTI. UFT 61 is defined earlier as having a 16 bit FTI, so all FTIs ranging between 0 and 216 -1 (65␠535) are valid. The UFTI5 parameter defines a FARF5 address for #APPOP with a UFT of 61 and an FTI of 21. Note that the same UFT can be used for both FARF4 and FARF5 addresses but a UFT/FTI pair can only be used once.
UFTFTI UFTI=((10,6),(11,6))
RAMFIL RECID=#FRED,RECNO=100,BAND=10,UFTI4=(10,1),UFTI5=(11,1)
RAMFIL RECID=#BILL,RECNO=101,BAND=11,UFTI4=(10,2),UFTI5=(11,2)
RAMFIL RECID=#EDNA,RECNO=102,BAND=12,UFTI4=(10,3),UFTI5=(11,3) 32 bits
- (6 bits UFT length + 6 bits FTI length)
---------
20 bit ordinal number or ordinals < 220 (1␠048␠
or
- (2 FARF4 control bits)
---------
18 bit ordinal number or ordinals < 218 (262␠144) for FUFTs and FTIs can be thought of as first and middle names, while ordinals can be considered last names. Every unique record ordinal needs a unique first, middle, and last name.
UFTFTI UFTI=((3,22),(5,21)),MODE=FARF4
RAMFIL RECID=#FRED,RECNO=16,UFTI4=((3,1026),(5,24),(3,437)),TYPE=S SAA series of record ordinals is specified by the following RAMFIL macro statement. The type of record is #FRED. There are 16 small ordinals on device A. UFTI4 indicates they are FARF4 record ordinals that are divided among 3 UFTI pairs. The first pair (3,1026) is the first and middle name for the first group of four ordinals. The last names for these are 0, 1, 2, and 3. The second group of ordinals is specified by the (5,21) pair. The second group has 3 bits available according to the previous UFTFTI macro and this allows 8 ordinals: 0, 1, 2,..., and 7. Finally, the third group has 2 bits, because it is governed by the UFT 3, and so 4 ordinals.
UFT=3| UFT=5 | UFT=3
FTI=1026| FTI=24 | FTI=437
| |
ordinals: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| | #FRED ordinal 0: 3 1026 0
ordinal 1: 3 1026 1
ordinal 2: 3 1026 2
ordinal 3: 3 1026 3 _____
ordinal 4: 5 24 0
ordinal 5: 5 24 1
ordinal 6: 5 24 2
⋮ ⋮ ⋮ ⋮ ⋮
ordinal 11: 5 24 7 _____
ordinal 12: 3 437 0
ordinal 13: 3 437 1
ordinal 14: 3 437 2
ordinal 15: 3 437 3Observe that when a new UFTI pair starts, the ordinal number index in the address begins again at zero.
U F O
F T r I
T I d n
i d
n e
a x
l
- - -
3 1 0
3 1 1
3 1 2
3 1 3
3 2 0
3 2 1
3 2 2
3 2 3
3 3 0
3 3 1
3 3 2
3 3 3
⋮ ⋮ ⋮
3 222 0
3 222 1
3 222 2
3 222 3
U F O
F T r I
T I d n
i d
n e
a x
l
- - -
: : :
5 221 0
5 221 1
5 221 2
5 221 3
5 221 4
5 221 5
5 221 6
5 221 7