6. Routines for reading values from a table#
6.1. Routine TBEXVE: Reading values from a table column#
TBEXVE (tabname, para, nomobj, basobj, basobj, nbval, typval)
tabname |
In jxin |
K19 |
Name of the table from which you want to extract a column |
para |
in |
K16 |
Parameter designating the column to be extracted |
Nomobj |
In jxout |
K24 |
Object name JEVEUXcontenant the values read from the table |
basobj |
in |
K1 |
Base “G”, “V’on which we create the vector nomobj |
nbval |
out |
I |
Number of values extracted |
typval |
out |
K4 |
Type JEVEUXdes extracted values: I/R/C/K8, K16,… |
6.2. Routine TBEXFO: Create a function from a table#
TBEXFO (nomtab, parax, paray, nomfo, interp, prologd, basfon)
tabname |
In jxin |
K19 |
Name of the table from which you want to extract a function. |
parax |
in |
K16 |
Abscissa parameter designating the column to be extracted |
paray |
in |
K16 |
Ordered parameter designating the column to be extracted |
name |
In jxout |
K24 |
Name of the function to create |
interp |
in |
K1 |
|
proligd |
in |
K1 |
|
basfon |
in |
K1 |
Base “G”, “V’on which we create the function |
6.3. Routine TBLIVA: Reading the value of a cell#
TBLIVA (nomtab, npacri, lipacr, vi, vr, vc, vk, write, lprec, para, ctype,
Vali, valr, valc, valk, yesterday)
tabname |
In jxin |
K19 |
Name of the table from which you want to extract the value of a cell |
npacri |
in |
I |
Number of parameters involved in the criteria for choosing the line (lipacr dimension) |
lipacr |
in |
V (K16) |
List of criteria parameters |
vi |
in |
V (I) |
Criteria values for parameters” I “ |
vr |
in |
V (R) |
Criteria values for “R” parameters |
vc |
in |
V (C) |
Criteria values for “C” parameters |
vk |
in |
V (K*) |
Criteria values for “K” parameters |
lcrit |
in |
V (K8) |
List of secondary equality criteria for floating parameters: “EGAL”, “RELA”, “ABSO” see § 7.1.1 Special case of equality criteria |
lprec |
in |
V (R) |
List of details (for the criteria of equality of floating parameters see § 7.1.1 Special case of equality criteria…) |
para |
in |
K16 |
Parameter associated with the column of the requested value |
ctype |
out |
K8 |
Type of value found |
Vali |
out |
I |
Value found if parameter “I” |
valr |
out |
R |
Value found if parameter “R” |
valc |
out |
C |
Value found if parameter “C” |
valk |
out |
K* |
Value found if parameter “K” |
Yesterday |
out |
I |
Return code: 0: OK 1: para does not exist in the table for the row found 2: no line found matching the criteria 3: several lines found corresponding to the criteria |
This routine allows you to read the value associated with a given parameter for a row selected in a table. The line is selected by imposing values on certain parameters. The mechanism for selecting a row in a table (arguments lipacr, lcrit, lprec, vi, vr, vc, vk) is explained in § 7.1.1 Special case of equality criteria…
Example:
This is the table: T3
A |
B |
C |
7 |
4 |
“Z” |
12 |
0 |
“A1” |
4 |
“A2” |
liparc (1) ='A', fr (1) =6.999, write (1) =' RELA ', lprec (1) =0.01
lipacr (2) ='B', vi (1) = 4
CALL TBLIVA (T3.2, lipacr, vi, vr, vr, vc, vk, write, lprec, 'C', ctype, valid,
& valr, valc, valk, yesterday)
At the output we have:
Valk='z'
Ier=0
ctype='K8'