1 /* BEGIN mdbm_scope_info.incl.pl1 -- odf 8/8/78 */ 2 3 /* WARNING 4 If the scope_info or scope_flags structure is changed then the 5 mrds_data_ item saved_res_version MUST be incremented to invalidate 6 all existing saved resultants 7 */ 8 9 /* Modified by Jim Gray - - 80-11-17, to add back store/delete/modify permissions */ 10 11 /* 80-12-10 Jim Gray : change name of store to append_tuple, delete to delete_tuple, 12 modify to modify_attr, retrieve to read_attr, remvoe update, put level 4 13 qualifiers for permit/prevent modes and to put pads in standard format */ 14 15 /* 80-12-11 Jim Gray : added submodel version of file/rel name for convenience */ 16 17 /* 80-12-22 Jim Gray : added like referenced structure so linus_scope_data.incl 18 could make use of it for compatibility. */ 19 20 /* 81-1-11 Jim Gray : added touched bit to scope_flags, so that 21 the fact that null scope has been set can be displayed */ 22 23 /* 85-04-14 Thanh Nguyen: Made scope_flags to be aligned so we could access the 24 prevent flags from any pointer which directly pointed to scope_flags itself 25 (i.e rm_rel_info.scope_flags_ptr). */ 26 27 /* this structure is to be allocated in the mrds_dbcb.incl.pl1 static area, 28 and is used to maintain the scope mechanism for file access. 29 It contains the scope permit/prevent operations that this user 30 has set in his view for this opening instance. */ 31 32 dcl 1 scope_info aligned based (scope_ptr), /* array of scope tuples for this user */ 33 2 mbz1 bit (144), /* Reserved for future use */ 34 2 nfiles fixed bin, /* Number of scope tuples in user's scope */ 35 2 active_scopes fixed bin, /* number of scopes currently active for a given user */ 36 2 scope (max_file_init refer (scope_info.nfiles)), /* defines user's scope of access to files */ 37 3 name char (30) aligned, /* filename */ 38 3 sm_name char (32), /* name of file(rel) in submodel */ 39 3 flags like scope_flags ; 40 41 42 declare 1 scope_flags aligned based, /* common layout of scope flag bits */ 43 2 permits, /* modes to permit this user */ 44 3 read_attr bit (1) unal, /* read_attr access to this file in scope */ 45 3 append_tuple bit (1) unal, /* append_tuple concnrrency permission */ 46 3 delete_tuple bit (1) unal, /* delete_tuple concurrency permission on rel */ 47 3 modify_attr bit (1) unal, /* modify_attr concurrency permission */ 48 3 mbz2 bit (10) unal, /* for expansion of permit ops */ 49 2 prevents, /* modes to be denyed to other users */ 50 3 read_attr bit (1) unal, /* on if user has prevent on read_attr for this file */ 51 3 append_tuple bit (1) unal, /* prevent of append_tuple concurrency */ 52 3 delete_tuple bit (1) unal, /* prevent of delete_tuple concurrency */ 53 3 modify_attr bit (1) unal, /* prevent of modify_attr concurrency */ 54 3 mbz3 bit (10) unal, /* for future prevent concurrency modes */ 55 2 touched bit (1) unal, /* on => scope set for this relation */ 56 2 mbz4 bit (7) unal ; /* for future flags */ 57 58 dcl max_file_init fixed bin; /* nbr. of files in data base */ 59 dcl scope_ptr ptr init (null ()); /* points to scope_info array */ 60 dcl scope_rdy bit (6) unal init ("000011"b) int static options (constant); /* scope file ready modes (5 or 6) */ 61 dcl scope_rdy_array (6) bit (1) unal based; /* array format of scope_rdy string */ 62 63 /* END mdbm_scope_info.incl.pl1 */