1 06/03/80  dmd_
  2 
  3 Function:  This is a subroutine interface to the data model portion of a
  4 Multics Relation Data Store (MRDS) database.  Databases can be created, and
  5 information retrieved about the structure of the resulting data model.
  6 
  7 
  8 Notes for dmd_:  This entry is obsolete, see mmi_
  9 
 10 
 11 Entry points in dmd_:
 12 
 13 
 14 :Entry:close_dm:  05/15/80  dmd_$close_dm
 15 
 16 Syntax:
 17 call dmd_$close_dm (data_model_ptr, code) ;
 18 dcl dmd_$close_dm entry (ptr, fixed bin (35)) ;
 19 
 20 
 21 Notes:  Data_mode_ptr is the pointer returned from the call to dmd_$open_dm.
 22 
 23 Code is the standard status code.
 24 
 25 
 26 
 27 :Entry:create_db:  05/14/80  dmd_$create_db
 28 
 29 Syntax:
 30 call dmd_$create_db ("source_path", {"db_path",} {"-list",} {"-temp_dir",
 31    "temp_dir_path",} code) ;
 32 dcl dmd_$create_db entry options(variable) ;
 33 
 34 
 35 Notes:  Since create_mrds_db was written for command level, some of its error
 36 codes do not provide much detail, therefore the -list option should be used to
 37 provide full information.
 38 
 39 The arguments are to be character strings, identical to those given at command
 40 level except for the error code, which is fixed bin (35), in which is returned
 41 the first error encountered.
 42 
 43 If -temp_dir is used, temp_dir_path should be a separate character string
 44 argument.
 45 
 46 
 47 
 48 :Entry:get_attributes:  05/15/80  dmd_$get_attributes
 49 
 50 Syntax:
 51 call dmd_$get_attributes (data_model_ptr, relation_name, area_ptr, rd_ptr,
 52    code) ;
 53 dcl dmd_$get_attributes entry (ptr, char (32), ptr, ptr, fixed bin (35)) ;
 54 
 55 
 56 Notes:  Data_model_ptr is the pointer returned from the call to dmd_$open_dm.
 57 
 58 Relation name specifies the relation for which attribute information is
 59 desired.
 60 
 61 Area_ptr points to a user defined area in which the attribute information
 62 structure will be allocated.
 63 
 64 The rd_ptr points to the allocated attribute information structure.
 65 
 66 Code is the standard status code.
 67 
 68 The attribute information structure is declared as follows:
 69 
 70 dcl 1 rel_desc based (rd_ptr),
 71     2 num_attr fixed bin,
 72     2 key_length fixed bin (35),
 73     2 data_length fixed bin (35),
 74     2 num_keys fixed bin,
 75     2 inversion bit (1) unal,
 76     2 reserved bit (35) unal,
 77     2 attributes (num_attr_alloc refer (rel_desc.num_attr)),
 78       3 attribute_name char (32),
 79       3 domain_name char (32),
 80       3 bit_offset bit (18) unaligned,
 81       3 bit_length bit (18) unaligned,
 82       3 key_flag bit (1) unaligned,
 83       3 inver_flag bit (1) unaligned,
 84       3 unused bit (34) unaligned,
 85       3 key_attr_order fixed bin,
 86       3 descriptor bit (36);
 87 
 88 
 89 
 90 :Entry:get_header:  05/15/80  dmd_$get_header
 91 
 92 Syntax:
 93 call dmd_$get_header (data_model_ptr, area_ptr, dmh_ptr, code) ;
 94 dcl dmd_$get_header entry (ptr, ptr, ptr, fixed bin (35)) ;
 95 
 96 
 97 Notes:  Data_model_ptr is the pointer returned by dmd_$open_dm.
 98 
 99 The area_ptr points to a user defined area in which the header structure is to
100 be allocated.
101 
102 The dmh_ptr points to the allocated header structure.
103 
104 Code is the standard system status code.
105 
106 The header information structure is declared as follows:
107 
108 dcl 1 dm_header based (dmh_ptr),
109     2 dm_header_id char (8),
110     2 dmd_version fixed bin,
111     2 creator_id char (32),
112     2 create_time fixed bin (71);
113 
114 
115 
116 :Entry:get_relations:  05/15/80  dmd_$get_relations
117 
118 
119 Syntax:
120 call dmd_$get_relations (data_model_ptr, area_ptr, mr_ptr, code) ;
121 dcl dmd_$get_relations entry(ptr, ptr, fixed bin (35)) ;
122 
123 
124    Notes for get_relations:  Data_model_ptr is the pointer returned by
125    dmd_$open_dm.
126 
127    The area_ptr points to a user defined area in which the relation information
128    structure will be allocated.
129 
130    The mr_ptr points to the allocated relation information structure.
131 
132    Code is the standard status code.
133 
134    The relation information structure is declared as follows:
135 
136    dcl 1 model_relations based (mr_ptr),
137        2 nrels fixed bin (10),
138        2 relation_name (num_rels_alloc refer (model_relations.nrels)) char
139    (32);
140 
141 
142 
143 :Entry:open_dm:  05/15/80  dmd_$open_dm
144 
145 Syntax:
146 call dmd_$open_dm (database_path, mode, data_model_ptr, code) ;
147 dcl dmd_$open_dm entry (char (168), fixed bin, ptr, fixed bin (35)) ;
148 
149 
150 Notes:  Database_path is the relative path of the database, with or without the
151 .db suffix.
152 
153 Mode must be 2, for retrieval.
154 
155 Data_model_ptr is a pointer to the data model, used by the data model
156 information retrieval entries.
157 
158 Code is the standard status code.
159 
160 Any number of processes may open a data model.  A single user may open a
161 maximum of 64 data models.
162 
163 The user must have read access on the db_model, and on any relation models he
164 plans to access.
165 
166 
167