COMPILATION LISTING OF SEGMENT vrm_create_cursor Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/21/84 1429.2 mst Wed Options: optimize map 1 2 /* *********************************************************** 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 5* * * 6* *********************************************************** */ 7 8 vrm_create_cursor: create_cursor: proc (I_rel_opening_id, I_work_area_ptr, O_cursor_ptr, O_code); 9 10 /* . BEGIN_DESCRIPTION 11* 12* Allocate aand inititialize a cursor in the work_area. 13* 14* . END_DESCRIPTION 15**/ 16 17 /* History 18* 19* 82-08-19 R. Harvey: Initially written 20* 82-12-09 Modified by Roger Lackey : To added vrm_iocb_list_block handling 21* 83-05-26 Modified Roger Lackey : To conform to relation curdor sepcification 22* 83-06-21 Roger Lackey : Added secondary_iocb_ptr to vrm_cursor 23* 24**/ 25 26 27 28 29 /* Parameters */ 30 31 dcl I_rel_opening_id bit (36) aligned; 32 33 dcl I_work_area_ptr ptr; 34 dcl O_cursor_ptr ptr; 35 dcl O_code fixed bin (35); 36 37 38 call vrm_open_man$get_open_info_ptr (I_rel_opening_id, vrm_open_info_ptr, code); 39 if code ^= 0 then call error (code); 40 vrm_rel_desc_ptr = vrm_open_info.relation_model_ptr; 41 42 work_area_ptr = I_work_area_ptr; 43 44 allocate vrm_cursor in (work_area) set (vrm_cursor_ptr); 45 46 vrm_cursor.opening_id = I_rel_opening_id; 47 string (vrm_cursor.debug_sw) = "0"b; 48 string (vrm_cursor.switches) = "0"b; 49 50 vrm_cursor.open_info_ptr = vrm_open_info_ptr; 51 vrm_cursor.vrm_relation_desc_ptr = vrm_rel_desc_ptr; 52 vrm_cursor.iocb_ptr = null (); /* Do this for cleanup */ 53 vrm_cursor.secondary_iocb_ptr = null (); /* Do this for cleanup */ 54 vrm_cursor.search_list_ptr = null; 55 vrm_cursor.search_keys_ptr = null; 56 vrm_cursor.vrm_iocb_list_block_ptr = null; 57 vrm_cursor.vrm_iocb_list_block_iocbs_ix = 0; 58 59 call vrmu_iocb_manager$add_cursor_iocb (vrm_cursor_ptr, code); 60 if code ^= 0 then call error (code); 61 62 if metering_sw then do; 63 call vrm_meter$add_meter (vrm_cursor_ptr, vrm_cursor.meter_ptr, code); 64 if code ^= 0 then call error (code); 65 if vrm_cursor.meter_ptr ^= null then do; 66 vrm_cursor.switches.meter_sw = "1"b; 67 vrm_meter_ptr = vrm_cursor.meter_ptr; 68 vrm_meter.switches.metering = "1"b; 69 end; 70 71 end; 72 else do; 73 vrm_cursor.meter_ptr = null; 74 vrm_cursor.switches.meter_sw = "0"b; 75 end; 76 77 78 O_cursor_ptr = vrm_cursor_ptr; 79 O_code = 0; 80 81 Exit: return; 82 83 error: proc (ecode); 84 dcl ecode fixed bin (35); 85 86 O_code = ecode; 87 if vrm_cursor_ptr ^= null () 88 then do; 89 free vrm_cursor; 90 vrm_cursor_ptr = null (); 91 end; 92 93 goto Exit; 94 95 end error; 96 97 98 99 100 metering_on: entry; /* Called by vrm_meter */ 101 metering_sw = "1"b; 102 return; 103 104 105 metering_off: entry; /* Called by vrm_meter */ 106 metering_sw = "0"b; 107 return; 108 1 1 /* BEGIN INCLUDE vrm_cursor.incl.pl1 */ 1 2 1 3 /* 83-05-26 Roger Lackey : Modifyed for relation cursors */ 1 4 1 5 dcl vrm_cursor_ptr pointer; /* Pointer to this structure */ 1 6 1 7 dcl 1 vrm_cursor aligned based (vrm_cursor_ptr), /* vfile relation manager cursor */ 1 8 2 opening_id bit (36) aligned, /* ID of opening associated with this cursor */ 1 9 2 debug_sw unal, /* Undefined MBZ */ 1 10 3 trace_open bit (1) unal, /* Show opening of iocb cursor creation time */ 1 11 3 pad bit (35) unal, 1 12 2 switches, 1 13 3 shared bit (1) unal, /* Other processes can use this relation */ 1 14 3 meter_sw bit (1) unal, /* On = Keep meters for this cursor */ 1 15 3 pad bit (7) unal, /* Unsed */ 1 16 2 opening_mode fixed bin, /* Opening mode for this cursor (8 = KSQR 10 = KSQU) */ 1 17 2 open_info_ptr pointer, /* Pointer to parent opening info structure */ 1 18 2 vrm_relation_desc_ptr pointer, /* Pointer to parent rel desc */ 1 19 2 iocb_ptr pointer, /* Pointer to attach iocb */ 1 20 2 secondary_iocb_ptr ptr, /* Second iocb_ptr used by vrmu_search */ 1 21 2 search_list_ptr ptr, /* Pointer to search_list */ 1 22 2 search_keys_ptr ptr, /* Pointer to search_keys array */ 1 23 2 meter_ptr pointer, /* Pointer metering str if metering is on or null */ 1 24 2 vrm_iocb_list_block_ptr pointer, /* Pointer to vrm_iocb_list_block that contains this cursors iocb */ 1 25 2 vrm_iocb_list_block_iocbs_ix fixed bin; /* Index into list_block.iocbs for location of iocb */ 1 26 1 27 1 28 /* END INCLUDE vrm_cursor.incl.pl1 */ 109 110 2 1 /* BEGIN INCLUDE vrm_open_info.incl.pl1 */ 2 2 2 3 /* R. Harvey 82-11-02 2 4* 82-09-82 Roger Lackey: added iocb_list_ptr */ 2 5 2 6 dcl 1 vrm_open_info aligned based (vrm_open_info_ptr), /* Vfile relation description */ 2 7 2 version char (8), /* Version number of this structure */ 2 8 2 opening_id bit (36) aligned, /* Opening id associated with this desc */ 2 9 2 file_uid bit (36) aligned, /* Unique id of msf dir */ 2 10 2 number_of_openings fixed bin, /* Number of separate calls to vrm$open */ 2 11 2 switches, 2 12 3 shared bit (1) unal, /* Open relation in shared mode */ 2 13 3 pad bit (35) unal init ("0"b), /* Unused must be zero */ 2 14 2 database_dir_path char (168) varying, /* Absolute path of database */ 2 15 2 relation_name char (30) varying, /* Name of relation */ 2 16 2 relation_model_ptr pointer, /* Pointer to the relation_model in the relation itself or a temp seg */ 2 17 2 com_ptr pointer, /* Temp seg for cursors and scratch space */ 2 18 2 iocb_list_ptr pointer, /* Pointer to first vrm_iocb_list_block */ 2 19 2 primary_key_info_ptr pointer, /* Special case collection info ptr */ 2 20 2 number_of_index_collections fixed bin, /* Count of index collections (include primary key) */ 2 21 2 index_collection (voi_no_of_index_collections 2 22 refer (vrm_open_info.number_of_index_collections)), 2 23 3 id bit (36), 2 24 3 info_ptr ptr unal; /* Points to more detailed info */ 2 25 2 26 2 27 dcl VRM_OPEN_INFO_VERSION_1 char (8) int static options (constant) init (" 1"); 2 28 dcl vrm_open_info_ptr ptr; 2 29 dcl voi_no_of_index_collections fixed bin; 2 30 2 31 /* END INCLUDE vrm_open_info.incl.pl1 */ 111 112 3 1 /* BEGIN INCLUDE vrm_rel_desc.incl.pl1 */ 3 2 3 3 /* 83-05-26 Roger Lackey : Added vrm_attr_info.key_head bit for relation_cursors */ 3 4 3 5 dcl 1 vrm_rel_desc based (vrm_rel_desc_ptr), 3 6 2 record_id bit (12) unal, /* Distinguish us from tuples and collection records */ 3 7 2 version char (8), /* Version of this structure */ 3 8 2 file_id bit (7), /* Value of file id from model */ 3 9 2 rel_id bit (12), /* Relation id */ 3 10 2 switches, 3 11 3 MRDS_compatible bit (1) unal, /* For pre-relation_manager_ MRDS */ 3 12 3 stationary_records 3 13 bit (1) unal, /* On = stationary */ 3 14 3 indexed bit (1) unal, /* This relation has attributes with secondary indices */ 3 15 3 pad bit (33) unal, 3 16 2 var_offset fixed bin (35), /* Position of first varying attr */ 3 17 2 maximum_data_length 3 18 fixed bin (35), /* Maximum size of tuple in characters */ 3 19 2 number_primary_key_attrs 3 20 fixed bin, /* Number of attributes which make up the primary key */ 3 21 2 number_sec_indexes fixed bin, /* Number of attributes which have a secondary index */ 3 22 2 last_var_attr_no fixed bin, /* Attr index of last varying attribute */ 3 23 2 number_var_attrs fixed bin, /* Number of varying attributes */ 3 24 2 number_attrs fixed bin, /* Number of attribute in rel */ 3 25 2 attr (vrd_no_of_attrs /* Description of each attribute */ 3 26 refer (vrm_rel_desc.number_attrs)) aligned like vrm_attr_info; 3 27 3 28 dcl 1 vrm_attr_info based (vrm_attr_info_ptr), 3 29 /* Attribute specific info */ 3 30 2 name char (32), /* Name of the attribute */ 3 31 2 descriptor bit (36) aligned, /* domain descriptor */ 3 32 2 varying bit (1) unal, /* ON = This is a varying string */ 3 33 2 key_head bit (1) unal, /* ON = This attr can be a keyhead */ 3 34 2 primary_key_attr bit (1) unal, /* ON = This is a primary key attribute */ 3 35 2 pad bit (15) unal, /* unused */ 3 36 2 index_collextion_ix fixed bin (17) unal, /* Index into vrm_open_info.index_collection array if key_head is on */ 3 37 2 bit_length fixed bin (35), /* Maximum bit length of tuple */ 3 38 2 bit_offset fixed bin (35); /* Offset in tuple if fixed, index to offset in tuple if varying */ 3 39 3 40 3 41 dcl vrm_rel_desc_ptr pointer; 3 42 dcl vrd_no_of_attrs fixed bin; 3 43 dcl VRM_REL_DESC_RECORD_ID bit (12) unal int static options (constant) init ("100000000000"b); 3 44 dcl VRM_REL_DESC_VERSION_1 char (8) int static options (constant) init (" 1"); 3 45 dcl vrm_attr_info_ptr pointer; 3 46 dcl VRM_REL_DESC_KEY char (256) varying int static options (constant) init ("@relation_description"); 3 47 3 48 /* END INCLUDE vrm_rel_desc.incl.pl1 */ 113 114 4 1 /* BEGIN INCLUDE vrm_meter.incl.pl1 */ 4 2 4 3 dcl vrm_meter_ptr pointer; 4 4 4 5 dcl 1 vrm_meter aligned based (vrm_meter_ptr), 4 6 2 cursor_name char (32), /* Name of cursor */ 4 7 2 meter_start_time fixed bin (71), 4 8 2 switches, 4 9 3 metering bit (1) unal, /* On = meter being done */ 4 10 3 mbz bit (35) unal, 4 11 2 cursor_ptr ptr, /* Pointer to vrm_cursor structure */ 4 12 2 last_call_stats like statistics, 4 13 2 total_stats like statistics; 4 14 4 15 dcl 1 statistics based, /* Used in like above */ 4 16 2 last_time_of_stats fixed bin (71), /* Last clock value for stats taken */ 4 17 2 vcpu_time float bin (63), /* The vcpu for this cursor */ 4 18 2 page_faults fixed bin (70), /* Page faults for this cursor */ 4 19 2 number_times_locked fixed bin (70), /* Number of time a lock was set */ 4 20 2 number_times_used fixed bin (70), /* Number of time cursor was used */ 4 21 2 num_times_search_called fixed bin (70), /* Number of time vrm_search was called */ 4 22 2 records_searched fixed bin (70), /* The records searched */ 4 23 2 seek_heads fixed bin (70), /* The seek heads done for key searches */ 4 24 2 special_seek_heads fixed bin (70), /* The seek heads done for key searches */ 4 25 2 keys_read fixed bin (70), /* The keys read by key search */ 4 26 2 keys_compared fixed bin (70), /* The keys compared in key search */ 4 27 2 key_hits fixed bin (70), /* The key hits for key search */ 4 28 2 non_key_compares fixed bin (70), /* The non_key compares done for this cursor */ 4 29 2 non_key_hits fixed bin (70), /* The non_key hits for this cursor */ 4 30 2 upper_limit_found_count fixed bin (70), /* The number of times upper limit was exceeded */ 4 31 2 number_items_returned fixed bin (70), /* Number of tuples or tid returned */ 4 32 2 number_tuples_deleted fixed bin (70), /* Number of tuples deleted */ 4 33 2 number_tuples_modified fixed bin (70), /* Number of tuples modified */ 4 34 2 number_tuples_stored fixed bin (70); /* Number of tuples stored */ 4 35 4 36 /* END INCLUDE vrm_meter.incl.pl1 */ 115 116 117 dcl code fixed bin (35); 118 dcl metering_sw bit (1) internal static init ("0"b); 119 dcl null builtin; 120 dcl string builtin; 121 dcl vrmu_iocb_manager$add_cursor_iocb entry (ptr, fixed bin (35)); 122 dcl vrm_meter$add_meter entry (ptr, ptr, fixed bin (35)); 123 dcl vrm_open_man$get_open_info_ptr entry (bit (36) aligned, ptr, fixed bin (35)); 124 dcl work_area area based (work_area_ptr); 125 dcl work_area_ptr ptr; 126 127 end vrm_create_cursor; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/21/84 0933.6 vrm_create_cursor.pl1 >special_ldd>online>mrds_install>vrm_create_cursor.pl1 109 1 10/14/83 1609.1 vrm_cursor.incl.pl1 >ldd>include>vrm_cursor.incl.pl1 111 2 10/14/83 1609.1 vrm_open_info.incl.pl1 >ldd>include>vrm_open_info.incl.pl1 113 3 10/14/83 1609.1 vrm_rel_desc.incl.pl1 >ldd>include>vrm_rel_desc.incl.pl1 115 4 10/14/83 1609.1 vrm_meter.incl.pl1 >ldd>include>vrm_meter.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. I_rel_opening_id parameter bit(36) dcl 31 set ref 8 8 38* 46 I_work_area_ptr parameter pointer dcl 33 ref 8 8 42 O_code parameter fixed bin(35,0) dcl 35 set ref 8 8 79* 86* O_cursor_ptr parameter pointer dcl 34 set ref 8 8 78* code 000110 automatic fixed bin(35,0) dcl 117 set ref 38* 39 39* 59* 60 60* 63* 64 64* debug_sw 1 based structure level 2 packed unaligned dcl 1-7 set ref 47* ecode parameter fixed bin(35,0) dcl 84 ref 83 86 iocb_ptr 10 based pointer level 2 dcl 1-7 set ref 52* meter_ptr 20 based pointer level 2 dcl 1-7 set ref 63* 65 67 73* meter_sw 2(01) based bit(1) level 3 packed unaligned dcl 1-7 set ref 66* 74* metering 12 based bit(1) level 3 packed unaligned dcl 4-5 set ref 68* metering_sw 000010 internal static bit(1) initial unaligned dcl 118 set ref 62 101* 106* null builtin function dcl 119 ref 52 53 54 55 56 65 73 87 90 open_info_ptr 4 based pointer level 2 dcl 1-7 set ref 50* opening_id based bit(36) level 2 dcl 1-7 set ref 46* relation_model_ptr 72 based pointer level 2 dcl 2-6 ref 40 search_keys_ptr 16 based pointer level 2 dcl 1-7 set ref 55* search_list_ptr 14 based pointer level 2 dcl 1-7 set ref 54* secondary_iocb_ptr 12 based pointer level 2 dcl 1-7 set ref 53* statistics based structure level 1 unaligned dcl 4-15 string builtin function dcl 120 set ref 47* 48* switches 12 based structure level 2 in structure "vrm_meter" dcl 4-5 in procedure "create_cursor" switches 2 based structure level 2 in structure "vrm_cursor" dcl 1-7 in procedure "create_cursor" set ref 48* vrm_attr_info based structure level 1 unaligned dcl 3-28 vrm_cursor based structure level 1 dcl 1-7 set ref 44 89 vrm_cursor_ptr 000100 automatic pointer dcl 1-5 set ref 44* 46 47 48 50 51 52 53 54 55 56 57 59* 63* 63 65 66 67 73 74 78 87 89 90* vrm_iocb_list_block_iocbs_ix 24 based fixed bin(17,0) level 2 dcl 1-7 set ref 57* vrm_iocb_list_block_ptr 22 based pointer level 2 dcl 1-7 set ref 56* vrm_meter based structure level 1 dcl 4-5 vrm_meter$add_meter 000014 constant entry external dcl 122 ref 63 vrm_meter_ptr 000106 automatic pointer dcl 4-3 set ref 67* 68 vrm_open_info based structure level 1 dcl 2-6 vrm_open_info_ptr 000102 automatic pointer dcl 2-28 set ref 38* 40 50 vrm_open_man$get_open_info_ptr 000016 constant entry external dcl 123 ref 38 vrm_rel_desc_ptr 000104 automatic pointer dcl 3-41 set ref 40* 51 vrm_relation_desc_ptr 6 based pointer level 2 dcl 1-7 set ref 51* vrmu_iocb_manager$add_cursor_iocb 000012 constant entry external dcl 121 ref 59 work_area based area(1024) dcl 124 ref 44 work_area_ptr 000112 automatic pointer dcl 125 set ref 42* 44 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. VRM_OPEN_INFO_VERSION_1 internal static char(8) initial unaligned dcl 2-27 VRM_REL_DESC_KEY internal static varying char(256) initial dcl 3-46 VRM_REL_DESC_RECORD_ID internal static bit(12) initial unaligned dcl 3-43 VRM_REL_DESC_VERSION_1 internal static char(8) initial unaligned dcl 3-44 voi_no_of_index_collections automatic fixed bin(17,0) dcl 2-29 vrd_no_of_attrs automatic fixed bin(17,0) dcl 3-42 vrm_attr_info_ptr automatic pointer dcl 3-45 vrm_rel_desc based structure level 1 unaligned dcl 3-5 NAMES DECLARED BY EXPLICIT CONTEXT. Exit 000166 constant label dcl 81 ref 93 create_cursor 000013 constant entry external dcl 8 error 000212 constant entry internal dcl 83 ref 39 60 64 metering_off 000202 constant entry external dcl 105 metering_on 000170 constant entry external dcl 100 vrm_create_cursor 000023 constant entry external dcl 8 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 352 372 236 362 Length 636 236 20 230 113 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME create_cursor 90 external procedure is an external procedure. error internal procedure shares stack frame of external procedure create_cursor. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 metering_sw create_cursor STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME create_cursor 000100 vrm_cursor_ptr create_cursor 000102 vrm_open_info_ptr create_cursor 000104 vrm_rel_desc_ptr create_cursor 000106 vrm_meter_ptr create_cursor 000110 code create_cursor 000112 work_area_ptr create_cursor THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry alloc_based free_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. vrm_meter$add_meter vrm_open_man$get_open_info_ptr vrmu_iocb_manager$add_cursor_iocb NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 8 000006 38 000030 39 000043 40 000047 42 000052 44 000056 46 000063 47 000066 48 000067 50 000070 51 000072 52 000074 53 000076 54 000077 55 000100 56 000101 57 000102 59 000103 60 000114 62 000120 63 000123 64 000136 65 000142 66 000147 67 000151 68 000153 71 000155 73 000156 74 000161 78 000163 79 000165 81 000166 100 000167 101 000175 102 000200 105 000201 106 000207 107 000211 83 000212 86 000214 87 000217 89 000223 90 000225 93 000227 ----------------------------------------------------------- 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