3. Operands#

3.1. Operand TABLE#

♦ TABLE = my table

Name of the initial table on which we will perform manipulations.

3.2. Operand ACTION#

♦ ACTION = (_F (OPERATION ='xxx',...), _F (OPERATION ='yyy',...),...)

The « actions » are carried out one after the other. Operation “yyy” takes the table in the state in which operation “xxx” left it.

It is much more efficient to repeat the keyword factor ACTION than to make as many successive calls to the CALC_TABLE command.

3.3. OPERATION = “COMB”: concatenate/combine two tables#

The COMBpermet operation of concatenating, combining two tables together, with stitching on a list of common parameters.

3.3.1. Operand TABLE#

Name of the table whose values should supercharge and/or enrich the initial table.

3.3.2. Operand NOM_PARA#

Name of parameters whose values must be the same in both tables.

3.3.3. Operand FORMAT_R#

This is a format that will be used before comparing two real numbers to determine if they are the same or not. Note that in the table, we get the unrounded value (from the second table).

3.3.4. Operand RESTREINT#

Example of combining two tables:

tab_resu= CALC_TABLE (TABLE =tab1,

ACTION =_F (OPERATION =” COMB “,

TABLE =tab2,

NOM_PARA =( “ABSC_CURV”, “NOEUD”),

RESTREINT =” NON “))

When ABSC_CURV and NOE UDsont are the same between tab1 and tab2, the values of tab2 are inserted on the row of tab1 (for the other parameters common to the 2 tables, it is therefore the value of tab2 that overwrites that of tab1).

If ABSC_CURV and/or NOE UDdiffèrent between tab1 and tab2, we add the line from tab2 to the end of tab1. NOM_PARAagit as a primary key: if you don’t find the pair (ABSC_CURV, NOEUD) more than once, you add the line.

The same operation with RESTREINT =” OUI “produces the same rows when ABSC_CURV and NODE are the same. However, no rows are added when the parameters differ.

3.4. OPERATION = “OPER”: Apply a formula#

Allows you to apply a formula whose variables are the parameters of the table and to insert the result in a new column.

3.4.1. Operand FORMULE#

Name of the formula to be applied

3.4.2. Operand NOM_PARA#

The name of the new column.

3.4.3. Operand NOM_COLONNE#

This keyword allows you to use a formula whose parameters are not parameters in the table.

For example, we have a formula that depends on INST. If you want to evaluate this formula using column INST_FIN in the table, you just need to specify NOM_COLONNE =” INST_FIN “.

3.5. OPERATION = “RENOMME”: Rename table parameters#

Operation RENOMME allows you to rename one or more parameters of a table.

3.5.1. Operand NOM_PARA#

Parameter name: pair of values (old parameter name, new parameter name)

3.6. OPERATION = “FILTRE”: Filter rows according to certain criteria#

This keyword factor allows you to filter the rows in the table. For the use of this keyword see command IMPR_TABLE [U4.91.03].

3.7. OPERATION = “EXTR”: Extract certain columns from a table#

Operation EXTRpermet to extract certain columns from a table.

3.7.1. Operand NOM_PARA#

Name of the parameters you want to extract.

3.8. OPERATION = “TRI”: Order the lines#

Operation TRI allows you to order the rows according to the values of the parameters.

3.8.1. Operand NOM_PARA#

Names of the parameters to be sorted.

3.8.2. Operand ORDRE#

/”DECROISSANT”

This keyword is used to specify whether to use ascending or descending order. By default, we sort in ascending order.

The order relationships used are:

  • the natural order for integers and real numbers,

  • alphabetical order for texts and concept names.

Notes:

A complex parameter cannot be used to classify rows in a table.

For parameters NODE (or MAILLE), the order is alphabetical because these parameters contain the names of the nodes (or meshes) .

If we specify:

TRI =_F (NOM_PARA = ('NOEUD', 'INST'), ORDRE = 'CROISSANT'),

We will sort the rows in the table in the alphabetical order of the nodes. If there are multiple rows corresponding to a given node, the second sorting criterion (INST) will be used to classify these rows.

3.9. OPERATION = “AJOUT_LIGNE”: add a line#

Operation AJOUT_LIGNE allows you to add a row to an existing table.

3.9.1. Operand NOM_PARA#

♦ NOM_PARA = for

Parameter names (table column names) for the added row. You can very well only define values for certain columns in the table.

If a parameter name does not exist in the table, it is added. Its type is determined from the value provided.

3.9.2. Operand VALE#

♦ VALE = oval

List the values for each parameter in NOM_PARA. The type of values must be compatible with the types of columns in the table.

VALE can contain heterogeneous values including integer, real, string. The type must conform to the type of the table parameter.

The first value corresponds to the first parameter given in NOM_PARA, the second value to the second parameter, etc.

The lists NOM_PARA and VALE therefore have the same cardinal.

3.10. OPERATION = “AJOUT_COLONNE”: add a column#

The AJOUT_COLONNE operation allows you to add one or more constant columns (identical value for all rows, using the VALE keyword), or else, a single column with distinct values (using the VALE_COLONNE keyword).

3.10.1. Operand NOM_PARA#

♦ NOM_PARA = for

Parameter names, names of columns added to the table. None of these parameters should already be present in the table.

Only one parameter should be provided if VALE_COLONNE is used.

3.10.2. Operand VALE#

♦ VALE = oval

List the values in each column.

VALE can contain heterogeneous values including integers, real numbers, strings. The type associated with the parameter is determined from this value.

The first value corresponds to the first parameter given in NOM_PARA, the second value to the second parameter, etc.

The lists NOM_PARA and VALE therefore have the same cardinal.

3.10.3. Operand VALE_COLONNE#

♦ VALE_COLONNE = lval_col

List of values for rows in the added column.

The type of values provided can be integer, real, string. All values must be of the same type.

Values are added to the rows as ordered at the time of addition. There may be more or fewer values added than rows in the table. Either the column will be longer than the original table, or it will contain empty values.

3.11. OPERATION = “SUPPRIME”: delete columns#

Operation SUPPRIME allows you to delete one or more columns from an existing table.

3.11.1. Operand NOM_PARA#

♦ NOM_PARA = for

Parameter names, names of columns to remove from the table.

3.12. OPERATION = “UNIQUE”: deleting duplicates#

Operation UNIQUE allows you to remove duplicate rows in a table.

3.12.1. Operand NOM_PARA#

♦ NOM_PARA = for

Names of columns in which duplicates are to be found. Two lines are said to be duplicates if all these parameters are the same (except for real numbers where appropriate, see FORMAT_R).

3.13. OPERATION = “STATISTIQUES”#

Operation STATISTIQUES allows you to add information about the table itself.

The added columns are named STAT_NOM and STAT_VALE. They contain the name of the parameter and its value respectively.

The basic statistics added are: the number of rows (named NB_LIGNES), the number of columns (NB_COLONNES) and the number of empty cells (NB_VIDE).

3.13.1. Operand TITRE#

◊ TITRE = tit

Title of the table produced. When this one is not provided, the title of the input table is, depending on the operations, completed.

3.13.2. Operand INFO#

◊ INFO = under

Print additional information in the « message » file if inf=2. Nothing happens if inf=1.

3.14. OPERATION = “CALCUL”#

Operation CALCUL allows simple calculations for columns with real or integer variables in a table.


In the presence of reuse, a column with the name TYPE_CALCUL is added to the table. For each TYPE_CALCUL, a row is added with calculated values to the requested columns.


If there is no error, a new table is created with only the columns to be calculated as well as a column of TYPE_CALCUL. Each line corresponds to a type of calculation.

3.14.1. Operand NOM_PARA#

♦ NOM_PARA = for

Names of the parameters, names of the columns to be applied to the calculations in the table.

3.14.2. Operand TYPE_CALCUL#

♦ TYPE_CALCUL =/'MAXI',

/”MINI”, /”SOMM”, /”MOY”, /”MAXI_ABS”, /”MINI_ABS”, /”SOMM_ABS”,

Type of calculation to be applied to columns. It is possible to choose several types of calculation.

Choice of calculation types: “MAXI” for the maximum in the column, “MINI” for the minimum in the column, “” for the minimum in the column, “SOMM” for the sum in the column, “MOY” for the mean in the column, “MAXI_ABS” for the maximum of the absolute variables in the column, “” for the maximum of the absolute variables in the column, “MINI_ABS” for the sum of the variables SOMM_ABS absolute values in the column.