Routines for managing a table =============================== Routine TBCRSD: Create a new table ----------------------------------------- .. code-block:: text TBCRSD (tabname, base) .. csv-table:: "tabname", "in", "K19", "Name of the new table to create If it already exists, we destroy it + show" "base", "in", "K1", "Basis for creating the table table ('G', 'V',...)" Routine TBAJPA: Add parameters to the table -------------------------------------------------- .. code-block:: text TBAJPA (tabname, nbpar, nameby, typpar) .. csv-table:: "tabname", "in", "K19", "Name of the table where you want to add parameters" "nbpar", "in", "I", "Number of parameters to add" "name by", "in", "V (K16)", "List of names of parameters to be added" "typpar", "in", "V (K8)", "List of parameter types: 'R', 'I', 'C', 'C', 'K8', 'K8', 'K16', 'K24', 'K32'" Routine TBEXIP: Test the existence and type of a parameter ------------------------------------------------------------- .. code-block:: text TBEXIP (tabname, para, exist, typpar) .. csv-table:: "tabname", "in", "K19", "Name of the table to be examined" "para", "in", "K16", "parameter to test" "exist", "out", "L",". TRUE.: the parameter already exists in the tabname table" "typpar", "out", "K8", "type of parameters if they already exist in the table: 'R', 'I', 'C', 'K8', 'K16', 'K16', 'K16', 'K16', 'K16', 'K16', 'K16', 'K16', 'K16', 'K24', 'K32'" Routine TBFUTB: Merge multiple tables into a single table -------------------------------------------------------------- .. code-block:: text TBFUTB (tabout, basout, ntab, ltabin, ltabin, para, typpar, vi, vr, vc, vk) .. csv-table:: "taboo", "in", "K19", "Name of the table you want to create" "basout", "in", "K1", "Basis for creating the tabout table ('G', 'V',...)" "ntab", "in", "I", "Number of tables we want to merge" "ltabin", "in", "K19", "Names of the tables we want to merge" "para", "in", "K16", "New parameter (optional) that will distinguish the origin of each of the rows in the new table if para=' 'the following arguments are not used." "typpar", "in", "K8", "Type of the new parameter (optional)" "vi", "in", "V (I)", "List of values for the new parameter 'I' (optional)" "vr", "in", "V (R)", "List of values for the new 'R' parameter (optional)" "vc", "in", "V (C)", "List of values for the new parameter 'C' (optional)" "vk", "in", "V (K*)", "List of values for the new parameter 'K' (optional)" This routine can be useful for creating a sparse table, the developer can create each subtable separately and use routine TBFUTB to merge them into a single table. Example: We want to merge the 2 tables: T1 and T2 .. csv-table:: "**A**", "**B**", "**C**", "**D**" "x1", "x2", "", "x3" "", "x4", "", "x5" "x6", "x7", "x8", "" .. csv-table:: "**A**", "**B**", "**E**" "y1", "y2", "y3" "y4", "", "y5" If we write: .. code-block:: text Latin (1) =T1 Latin (2) =T2 CALL TBFUTB (T3, 'V',2, ltabin, '', kbid, ibid, rbid, cbid, kbid, kbid) We get the table: T3 .. csv-table:: "**A**", "**B**", "**C**", "**D**", "**E**" "x1", "x2", "", "x3", "" "", "x4", "", "x5", "" "x6", "x7", "x8", "", "" "y1", "y2", "", "", "y3" "y4", "", "", "", "y5" If we write: .. code-block:: text Latin (1) =T1 Latin (2) =T2 VK (1) =' ACTION1 ' VK (2) =' ACTION2 ' CALL TBFUTB (T3, 'V',2, Ltabin, 'N', 'K8', ibid, rbid, cbid, VK) We get the table: T3 .. csv-table:: "**N**", "**A**", "**B**", "**B**", "**C**", "**D**", "**E**" "ACTION1 ", "x1", "x2", "", "x3", "" "ACTION1 ", "", "x4", "", "x5", "" "ACTION1 ", "x6", "x7", "x7", "", "" "ACTION2 ", "y1", "y2", "", "", "", "y3" "ACTION2 ", "y4", "", "", "", "y5" *Notes on the order of rows and columns in the new table:* *The rows in the new table are ordered by putting the rows of the tables you are merging end to end.* *To order the parameters we adopt the following rules:* *- the new parameter (optional) is numbered first,* *- the parameters from the 1st table of* ltabin*are then added in the order they have in* ltabin (1) *- the parameters of the 2nd table of* ltabin*are then added (except those already present in* ltabin (1) *) in the order they have in* ltabin (2) *- ...* Routine DETRSD: Destroy a table ----------------------------------- .. code-block:: text CALL DETRSD ('TABLE_SDASTER', tabname) Routine COPISD: Duplicate a table ------------------------------------ .. code-block:: text CALL COPISD ('TABLE_SDASTER', 'V', tabin, taboo)