Data structure utilities ========================================== .. code-block:: text SUBROUTINE COPISD (TYPESD, BASE, SD1, SD2) Purpose: to duplicate a data structure (SD1) under another name (SD2). SD2 will have the same content as SD1. .. csv-table:: "IN", "TYPESD ", "K*", "type of the 2 data structures SD1et SD2." See the list of types allowed today in the header of the Fortran routine" "IN", "BASE ", "K1", "'G'/'V': name of the base where SD2 will be created" "IN JXIN "," SD1 ", "K*", "ASD name SD1" "IN JXOUT "," SD2 ", "K*", "ASD name SD2" .. code-block:: text LOGICAL FUNCTION IDENSD (TYPESD, SD1, SD2) Purpose: to test the identity of the content of 2 data structures SD1 and SD2 .. csv-table:: "IN", "TYPESD ", "K*", "type of the 2 data structures to be compared. See the list of types allowed today in the header of the Fortran routine" "IN JXIN "," SD1 ", "K*", "ASD name SD1" "IN JXIN "," SD2 ", "K*", "SD name SD2" "OUT "," IDENSD ", "L",". TRUE.: the 2SD SD1et SD2sont identical. FALSE.: the different SD1et SD2sont 2SD" .. code-block:: text SUBROUTINE EXISD (TYPESD, NOMSD, IRET) Purpose: answer the question: "Is there a data structure of type TYPSD and name NOMSD?". .. csv-table:: "IN", "TYPESD ", "K*", "type of data structure to be tested. See the list of types allowed today in the header of the Fortran routine" "IN JXIN "," NOMSD ", "K*", "name of the SD to be tested" "OUT "," IRET ", "I", "0: data structure doesn't exist 1: the data structure exists" .. code-block:: text SUBROUTINE DETRSD (TYPESD, NOMSD) Purpose: to destroy a data structure of type TYPSD and name NOMSD. That is to say destroy all the JEVEUX objects that make it up. .. csv-table:: "IN", "TYPESD ", "K*", "Type of data structure to be tested. See the list of types allowed today in the header of the Fortran routine" "IN JXIN "," NOMSD ", "K*", "name of the SD to be destroyed" .. code-block:: text SUBROUTINE IMPRSD (TYPESD, NOMSD, IFIC, TITRE) Purpose: to "legibly" print a data structure .. csv-table:: "IN", "TYPESD ", "K*", "Type of data structure to be tested. Types allowed today: CHAMP, CHAMP_S" "IN JXIN "," NOMSD ", "K*", "name of the SD to be printed" "IN", "IFIC ", "I", "logical file number ASCII for printing" "IN", "TITRE ", "K*", "title given in print." .. code-block:: text SUBROUTINE UTIMSD (IFIC, NIVEAU, LATTR, LCONT, SCH1, IPOS, BASE) Purpose: To completely print a data structure. That is to say, print the "raw" content of the JEVEUX objects that compose it. In reality, we don't really treat data structures: we look for all JEVEUX objects whose names contain a certain string of characters. But it turns out that in general, all objects in an SD have names that start with the same string. .. csv-table:: "IN", "IFIC ", "I", "logical printing unit" "IN", "NIVEAU ", "I", "wanted print level: 0: printing the only name of the objects. 1: for collections, we will only print the first 10 objects.. 2: we print all the collectibles -1: we print a "summary" of the objects: only one line per object." "IN", "LATTR ", "L",". TRUE.: we print the attributes of JEVEUX objects . FALSE.: you don't print the attributes of JEVEUX objects" "IN", "LCONT ", "L",". TRUE.: we print the values of the JEVEUX objects . FALSE.: you don't print the values of JEVEUX objects" "IN", "SCH1 ", "K*", "character string used to select the objects to be printed. The declaration of this chain is very important (its length), because it determines the number of objects found. if SCH1 =' TOTO 'but SCH1est declared K19, we will only print objects starting with 'TOTO' followed by 15 blanks." "IN", "IPOS ", "I", "position where we will search for the 1st character of SCH1." "IN", "BASE ", "K1", "name of the JEVEUXsur base where we are looking for the objects. ' G', 'V',... if '': we search on all open databases." Example 1: .. code-block:: text CALL UTIMSD (6,2,. FALSE.,. TRUE. , CHAMP (1:19) ,1, 'V') Do the "dump" of the field named CHAMP and which is located on the VOLATILE base. Attributes for JEVEUX objects are not printed. The result is printed in the.mess file. Example 2: .. code-block:: text CALL UTIMSD (8,0,. FALSE.,. FALSE.., '. DESC ',20, '') Write the names of all objects whose names contain the string '. DESC 'in position 20. The result is printed in the.resu file.