12/01/86 dsl_ This subroutine supplies entry points for the functions required in opening, manipulating, and closing a data base. Examples of its use are documented in the MRDS Reference Manual (AW53). Entry points in dsl_: (List is generated by the help command) :Entry: close: 06/17/86 dsl_$close Function: This entry causes the specified data bases to be closed and made unavailable for processing. Syntax: declare dsl_$close entry options (variable); call dsl_$close (data_base_index1, ..., data_base_indexn, code); Arguments: data_base_indexi (Input) (fixed bin(35)) is the integer returned by dsl_$open that designates the currently open data bases that are to be closed. code (Output) (fixed bin(35)) is a standard status code. :Entry: close_all: 06/17/86 dsl_$close_all Function: This entry closes all data bases that are currently open in the user's process. Syntax: declare dsl_$close_all entry options (variable); call dsl_$close_all (code); Arguments: code (output) (fixed bin(35)) is the standard status code and is 0 if all data bases are successfully closed or if no data bases are open. :Entry: compile: 12/01/86 dsl_$compile Function: This entry compiles (or pre-translates) a selection expression for later use in the current process, for retrieval, modify, delete, and define_temp_rel operations. A previously compiled selection expression can be deleted or redefined through this entrypoint. A selection expression can be compiled at any time in the life of an open data base and saved for future use in that opening. Syntax: declare dsl_$compile entry options (variable); call dsl_$compile (data_base_index, selection_expression, se_index, se_value1, ..., se_valuen, code; Arguments: data_base_index (Input) (fixed bin(35)) is the index returned by dsl_$open to designate the data base. selection_expression (Input) (char (*)) is a character string as defined at the beginning of this section. It may contain .V. argument substitution characters in all normal places. These are filled in at the time the selection expression is compiled. Argument substitution characters of the form .X. may be used in all places in the where clause where .V. is appropriate, except functions and expressions, to specify that this value is to be filled in at the time that the selection expression is used. se_index (Input/Output) (fixed bin(35)) is an integer used to identify a compiled selection expression. If the se_index is 0 (on input), a new compiled selection expression is defined and the index for the newly compiled selection expression is returned. If the se_index is greater than zero (on input) and a compiled selection expression with that index is found, it is redefined to the new selection expression. If the se_index is less than zero (on input) and a compiled selection expression with that index is found, it is deleted and the selection expression is ignored. se_value_i (Input) is a selection expression value for each control code (designated by .V.) appearing in the selection expression. These must be specified so as to correspond in order and quantity with the control codes specified in the selection expression. code (Output (fixed bin(35)) is a standard MRDS status code. A value of 0 indicates that no error occurred. Notes: Any .V. argument substitution characters supplied in the selection expression must have matching arguments supplied in the call to dsl_$compile. They are then considered to be constant and cannot be changed later. Any .X. argument substitution characters supplied in the selection expression must have matching arguments supplied in the call that references the compiled selection expression, not the call to dsl_$compile. The arguments supplied to satisfy a .X. must have the same data type as that of the data base attribute it is being compared to. :Entry: declare: 06/17/86 dsl_$declare Function: This entry makes a user-defined function known to MRDS while processing the specified data base. After it is declared, a user-defined function may be used exactly as a MRDS built-in function. If a user-defined function has the same name as a built-in function, the user-defined function is referenced. Syntax: declare dsl_$declare entry (fixed bin(35), char(*), fixed bin(35)); call dsl_$declare (db_index, fn_name, code); Arguments: db_index (Input) is the index returned by dsl_$open that designates the data base. fn_name (Input) is the name of the function being declared. code (Output) is a standard status code. Notes: Built-in functions are provided as a standard part of MRDS and need not be declared. User-defined functions may be written in PL/I, COBOL, or FORTRAN. MRDS generates a call that is equivalent to: return_val = fn_name$fn_name (arg1 ... argn) Restrictions on arguments to user-defined functions are (1) No star (*) extents are permitted in the declarations for return_val or argi; (2) Data types are restricted to those data types permitted in a MRDS data base (i.e., pointers, entries, labels, structures, offsets, and arrays are not allowed). :Entry: define_temp_rel: 06/17/86 dsl_$define_temp_rel Function: This entry allows the user to explicitly create, delete, or redefine a temporary relation that can be used by the current process for retrieval operations in the same manner as any predefined permanent data base relations. The only operations that can be performed on a temporary relation are the "define_temp_rel", "retrieve", and "get_population". After a temporary relation is defined, it is referenced by specifying a ".V." argument in the range clause and supplying the appropriate rel_index in the dsl_ call argument list. A temporary relation cannot be used in the -select clause except for the dsl_$retrieve call. Syntax: declare dsl_$define_temp_rel entry options (variable); call dsl_$define_temp_rel (data_base_index, selection_expression, se_index, se_value1, .., se_index, se_valuen, rel_index, code); Arguments: data_base_index (Input) (fixed bin(35)) is the index returned by dsl_$open that designates the data base. selection_expression (Input) (char(*)) is a character string as defined at the beginning of this section, with at least one * in the -select clause to define the temporary relation key. The attribute names given in the select clause must be unique. This character string may be a constant or a variable declared either character varying or non-varying. se_index (Input) (fixed bin(35)) is an integer used to refer to a compiled selection expression. It is required only if the selection expression is "-compiled". se_valuei (Input) is a selection expression value for each argument substitution (designated by .V. or .X.) appearing in the , including temporary relation (rel_index) designations. These must be specified so as to correspond in order and quantity with the argument substitution specified in the , including temporary relation (rel_index) designations. These must be specified so as to correspond in order and quantity with the argument substitution specified in the , including temporary relation (rel_index) designations. These must be specified so as to correspond in order and quantity with the argument substitution specified in the consisting of "-another". They cease to be available whenever any dsl_ entry is called with a consisting of an . The selection expression "-another" does not return duplicate tuples unless the -dup option was specified in the original . The -dup option cannot be used with set operations. The range clause may have a ".V." for substitution of a temporary relation's rel_index. se_index (Input) (fixed bin(35)) is an integer used to refer to a compiled selection expression. It is required only if the selection expression is "-compiled". se_valuei (Input) is a selection expression value for each argument substitution (designated by .V. or .X.) appearing in the , including temporary relation (rel_index) designations. These must be specified so as to correspond in order and quantity with the argument substitution specified in the . If an entire tuple is retrieved by specifying only the tuple_value in the select clause, then a value must be specified for every attribute of the corresponding relation as defined in the data submodel or in the data model, whichever is being used. If data conversion is required, only data types supported by assign_ may be used. code (Output) (fixed bin(35)) is a standard status code. A value of 0 indicates that no error occurred and that one occurrence of the specified data has been successfully retrieved. A value of mrds_error_$tuple_not_found indicates that no error occurred and that no data satisfied the selection expression. Notes: For shared openings, the referenced relations must have read_attr permit scope set. For attribute level security, attributes referenced in the select and where clauses must have read_attr access. :Entry: set_scope: 12/01/86 dsl_$set_scope Function: This entry defines the user's current scope of access to the data base for shared modes of openings. Syntax: declare dsl_$set_scope entry options (variable); call dsl_$set_scope (db_index, rel_name1, permit_ops1, prevent_ops1, ..., rel_namen, permit_opsn, prevent_opsn, wait_sec, code); Arguments: db_index (Input) (fixed bin(35)) is the index returned by dsl_$open that designates the data base. rel_namei (Input) (char(*)) is the name of the relation to be included in the scope. permit_opsi (Input) (fixed bin) is an integer consisting of the scope code which indicates the operations the user may perform on the relation. prevent_opsi (Input) (fixed bin) is an integer consisting of the scope code which indicates the operations that other users may not perform on the relation. wait_sec (Input) (fixed bin(35)) specifies the maximum number of seconds to wait for the scope request to be honored (there is no anticipated maximum). This argument is optional and if not provided by the user, the default is 30 seconds. code (Output) (fixed bin(35)) is a standard status code. The code is 0 if set_scope is successful or is mrds_error_$db_busy if the data base is busy. Notes: Before a user can access the data base in shared mode, a scope of access must be declared, consisting of a set of scope tuples. If this scope does not conflict with any other currently existing scope (of other processes), it is accepted. Otherwise, the user's request is placed in a queue and is processed as soon as the requested resources become available. If the specified wait time is exceeded before the request can be processed, an error code is returned. Once the scope has been accepted, only operations permitted by the scope may be performed. As time progresses in the current process, individual scope tuples may be removed as they are no longer needed by invoking dsl_$dl_scope. However, new tuples may not be added to the current scope until all current scope has been deleted. This rule avoids potential deadlock problems within the data base manager. Codes for operations to be prevented or permitted are; Scope Code Operation 0 null 1 read_attr or read 2 append_tuple or store 4 delete_tuple or delete 8 modify_attr or modify :Entry: set_scope_all: 12/01/86 dsl_$set_scope_all Function: This entry provides a means of setting a scope on all relations defined in the user's view without the need to name each relation. Identical permit operations and prevent operations are applied to all the relations in the user's view. Syntax: declare dsl_$set_scope_all entry options (variable); call dsl_$set_scope_all (db_index, permit_ops, prevent_ops, wait_sec, code); Arguments: db_index (Input) (fixed bin(35)) is the index returned by dsl_$open that designates the data base. permit_ops (Input) (fixed bin) is the scope code which indicates the operations the user may perform on the relation. prevent_ops (Input) (fixed bin) is the scope code which indicates the operations that other users may not perform on the relation. wait_sec (Input) (fixed bin(35)) specifies the maximum number of seconds to wait for the scope request to be honored (there is no anticipated maximum). This argument is optional and, if not provided by the user, the default is 30 seconds. code (Output) (fixed bin(35)) is a standard status code. Notes: Scope codes for operations to be prevented or permitted are: Scope Code Operation 0 null 1 read_attr or read 2 append_tuple or store 4 delete_tuple or delete 8 modify_attr or modify See dsl_$set_scope for access requirements. :Entry: set_temp_dir: 12/01/86 dsl_$set_temp_dir Function: This entry sets the directory that is used for temporary storage on the next call to dsl_$open. Syntax: declare dsl_$set_temp_dir entry (char(*), fixed bin(35)); call dsl_$set_temp_dir (path, code); Arguments: path (Input) (char(*)) is the relative or absolute pathname of the directory to be used for temporary storage on the next call to open. code (Output) (fixed bin(35)) is the standard status code and is 0 unless an error occurs. Notes: This temporary directory has a default of process directory. Therefore, this entry need never be called unless a record quota overflow occurs on the process directory, as might happen in opening a data base with a large number of relations, or during a large retrieve or define_temp_rel operation. See dsl_$set_temp_dir, dsl_$get_temp_dir, dsl_$get_opening_temp_dir, and the commands display_mrds_temp_dir and set_mrds_temp_dir. :Entry: store: 06/17/86 dsl_$store Function: This entry allows the user to add a tuple to a designated relation in the data base. Syntax: declare dsl_$store entry options (variable); call dsl_$store (data_base_index, relation_expression, new_value1, ... , new_valuen, code); Arguments: data_base_index (Input) (fixed bin(35)) is the index returned by dsl_$open that designates the data base. relation_expression (Input) (char(*)) indicates the relation to which the tuple is to be added, as it appears in the user's view of the data base (the data model or the data submodel). It may be the name of the relation or it may be "-another". new_valuei (Input) is the new tuple value to be added to the relation. The entire tuple, as defined in the user's view, may be specified with one structure or a list of variables, the items of which must correspond in order and quantity with the attributes defined in the user's view. code (Output) (fixed bin(35)) is a standard status code. The value is 0 if the store was successful. If a duplicate of the primary key already exists in the data base, the code value mrds_error_$dup_store is returned and the tuple is not stored. (The name mrds_error_$duplicate_key may also be used.) If a -check_proc option exists on a domain of one of the attributes in the relation for which a tuple is being added and the check procedure returns false, then the error code, mrds_error_$dom_integ, is returned. Notes: The placement of the new tuple within the relation is determined by MRDS, based upon data model/data submodel descriptions of the data base and the value of the primary key in the new tuple. The primary key of the new tuple must be unique within the designated relation. The caller must have read-write permission to the relation. If storing through a submodel view, all attributes of the relation must be defined in the submodel. If the relation_expression is the name of a relation, the new tuple is added to the named relation. If the relation_expression is "-another", the new tuple is added to the relation specified in the most recent call to the dsl_$store in which the relation_expression argument consisted of a relation name. Any call to a dsl entry requiring a causes the previously specified relation name to become unavailable for subsequent reference using "-another", until it is again established via a call to dsl_$store with a relation_expression consisting of the relation name. The use of "-another" provides an efficient means to store several tuples into a single relation via consecutive dsl_$store calls. For shared openings, the relation must have append_tuple permit scope set. For attribute level security, the relation must have append_tuple access and the key attributes must have read_attr access. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved