COMPILATION LISTING OF SEGMENT mrds_dsm_define_temp Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1018.5 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 mrds_dsm_define_temp: proc (dsm_pn, iocb_ptr, a_code); 19 20 /* 21* The function of the define_dsm module is to prepare a temporary 22* data submodel to accept relation definitions. If dsm_pn is null, 23* the path is set to a unique entry in the process directory. The 24* file is attached to a unique switchname for direct_output. A 25* temporary header record is written which contains the submodel 26* version and a string identifing the header record. A complete 27* header record cannot be written because the number of relations 28* is not yet known. The temporary record is needed because it 29* contains the submodel version. 30* 31* Known Bugs: 32* 33* Other Problems: 34* 35* HISTORY: 36* 37* 75-11-?? Lackey: written 38* 39* 76-12-?? Lackey: added creator_id to the header record 40* 41* 80-11-24 Spratt: Use the pathname specified in temp_dsm_pn, if 42* . it's non-null. Enforce the requirement that the dsm not 43* . exist prior to "definition." 44* 45* 81-02-24 Davids: reformated the header and declaration sections. 46* . removed the iox_modes include file. reformated the code 47* . and renamed some variables, also changed some 48* . declarations. the header record now written has null or 49* . 0 values in elements not used rather than just not 50* . setting them. 51* 52* 81-02-25 Davids: changed the temp_dsm_pn parameter to dsm_pn and 53* . added the internal variable internal_dsm_pn. this was 54* . needed so that if the path parameter was "" we could 55* . generate a path that was in the process directory. we 56* . could not merely just change the parameters value since 57* . it was an input parameter, also it was a zero length 58* . string whose value we could not change. 59* 60* 81-06-02 Davids: changed mrds_dsm_header_str.incl.pl1 to 61* . mrds_dsm_header; 62**/ 63 64 /* PARAMETERS */ 65 66 dcl dsm_pn char (*); /* (input) path of the dsm segment */ 67 dcl iocb_ptr ptr; /* (output) iocb pointer to the dsm segment */ 68 dcl a_code fixed bin (35); /* (output) standard error code */ 69 70 /* AUTOMATIC */ 71 72 dcl atd char (178) init (""); /* attach description for attachment to the dsm segment */ 73 dcl bit_count fixed bin (24); /* bit count of dsm segment, if it already exists */ 74 dcl code fixed bin (35); /* internal error code */ 75 dcl dsm_dir char (168); /* directory containing the dsm segment */ 76 dcl dsm_entry char (32); /* entry name of the dsm segment */ 77 dcl 01 header_str like mrds_dsm_header; /* automatic version of the header record */ 78 dcl internal_dsm_pn char (168); /* a working copy of the dsm_path */ 79 dcl key char (256) varying;/* key for the header record */ 80 dcl record_length fixed bin (21); /* size of header srecord in bytes */ 81 dcl type fixed bin (2); /* type of dsm entry, if it already exists */ 82 83 /* BASED */ 84 1 1 /* BEGIN INCLUDE FILE mrds_dsm_header.incl.pl1 1 2* 1 3*This include file is for internal MRDS use only - it is not to be 1 4*documented in any user manual. 1 5* 1 6*81-06-01 Davids: This is a copy of the mrds_dsm_header_str 1 7*include file, it is to be used by all mrds routines. The 1 8*structure name has been changed from dsm_header_record to 1 9*mrds_dsm_header to avoid conflicts when both this include file 1 10*and mrds_dsm_header_str are included (mrds_dsm_dsmd). 1 11**/ 1 12 1 13 dcl 1 mrds_dsm_header based, /* header structure for a MRDS submodel */ 1 14 2 dsm_generator_version fixed bin init (0), /* version number of submodel created by CMDSM */ 1 15 2 date_time_generated fixed bin (71) init (0), /* convert data to binary form of creation time */ 1 16 2 database_pn char (168) init (""), /* pathname of database this submodel is valid for */ 1 17 2 name char (32) init (""), /* identifying name for this header structure */ 1 18 2 num_of_relations fixed bin (35) init (0), /* number of relations in submodel view of database */ 1 19 2 creator_id char (32) init ("") ; /* the person.project.tag of the submodel creator */ 1 20 1 21 /* END INCLUDE FILE mrds_dsm_header.incl.pl1 */ 85 86 87 /* BUILTIN */ 88 89 dcl addr builtin; 90 dcl low builtin; 91 dcl null builtin; 92 dcl size builtin; 93 dcl substr builtin; 94 95 /* CONSTANTS */ 96 97 dcl KEYED_SEQUENTIAL_UPDATE fixed bin init (10) internal static options (constant); 98 99 /* ENTRIES */ 100 101 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 102 dcl get_pdir_ entry returns (char (168)); 103 dcl hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), fixed bin (35)); 104 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 105 dcl iox_$destroy_iocb entry (ptr, fixed bin (35)); 106 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 107 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 108 dcl iox_$seek_key entry (ptr, char (256) varying, fixed bin (21), fixed bin (35)); 109 dcl iox_$write_record entry (ptr, ptr, fixed bin (21), fixed bin (35)); 110 dcl unique_chars_ entry (bit (*)) returns (char (15)); 111 112 /* EXTERNAL */ 113 114 dcl error_table_$namedup external static fixed bin (35); 115 dcl error_table_$no_record external static fixed bin (35); 116 dcl error_table_$noentry external static fixed bin (35); 117 dcl mrds_data_$dsmd_version_number external static fixed bin; 118 119 if dsm_pn = "" 120 then internal_dsm_pn = substr (get_pdir_ (), 1, 32) || ">" || unique_chars_ ("0"b) || "temp_.dsm"; 121 else internal_dsm_pn = dsm_pn; 122 123 124 call expand_pathname_ (internal_dsm_pn, dsm_dir, dsm_entry, a_code); 125 if a_code ^= 0 126 then goto exit; 127 128 call hcs_$status_minf (dsm_dir, dsm_entry, 1, type, bit_count, a_code); 129 if a_code = 0 130 then do; 131 a_code = error_table_$namedup; 132 goto exit; 133 end; 134 else 135 if a_code ^= error_table_$noentry 136 then goto exit; 137 138 atd = "vfile_ " || internal_dsm_pn; 139 call iox_$attach_name ((unique_chars_ ("0"b) || ".dsm"), iocb_ptr, atd, null (), a_code); 140 if a_code ^= 0 141 then goto exit; 142 143 call iox_$open (iocb_ptr, KEYED_SEQUENTIAL_UPDATE, "0"b, a_code); 144 if a_code ^= 0 145 then do; 146 call iox_$detach_iocb (iocb_ptr, code); 147 call iox_$destroy_iocb (iocb_ptr, code); 148 goto exit; 149 end; 150 151 152 153 key = low (32); 154 call iox_$seek_key (iocb_ptr, key, record_length, a_code); 155 if a_code = error_table_$no_record 156 then do; 157 header_str.dsm_generator_version = mrds_data_$dsmd_version_number; 158 header_str.date_time_generated = 0; 159 header_str.database_pn = ""; 160 header_str.name = "data_submodel_header"; 161 header_str.num_of_relations = 0; 162 header_str.creator_id = ""; 163 164 record_length = size (header_str) * 4; 165 call iox_$write_record (iocb_ptr, addr (header_str), record_length, a_code); 166 end; 167 168 exit: 169 return; 170 171 end /* mrds_dsm_define_temp */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.7 mrds_dsm_define_temp.pl1 >special_ldd>online>mrds.pbf-04/18/85>mrds_dsm_define_temp.pl1 85 1 10/14/83 1608.9 mrds_dsm_header.incl.pl1 >ldd>include>mrds_dsm_header.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. KEYED_SEQUENTIAL_UPDATE 000000 constant fixed bin(17,0) initial dcl 97 set ref 143* a_code parameter fixed bin(35,0) dcl 68 set ref 18 124* 125 128* 129 131* 134 139* 140 143* 144 154* 155 165* addr builtin function dcl 89 ref 165 165 atd 000100 automatic char(178) initial unaligned dcl 72 set ref 72* 138* 139* bit_count 000155 automatic fixed bin(24,0) dcl 73 set ref 128* code 000156 automatic fixed bin(35,0) dcl 74 set ref 146* 147* creator_id 67 000242 automatic char(32) initial level 2 packed unaligned dcl 77 set ref 77* 162* database_pn 4 000242 automatic char(168) initial level 2 packed unaligned dcl 77 set ref 77* 159* date_time_generated 2 000242 automatic fixed bin(71,0) initial level 2 dcl 77 set ref 77* 158* dsm_dir 000157 automatic char(168) unaligned dcl 75 set ref 124* 128* dsm_entry 000231 automatic char(32) unaligned dcl 76 set ref 124* 128* dsm_generator_version 000242 automatic fixed bin(17,0) initial level 2 dcl 77 set ref 77* 157* dsm_pn parameter char unaligned dcl 66 ref 18 119 121 error_table_$namedup 000034 external static fixed bin(35,0) dcl 114 ref 131 error_table_$no_record 000036 external static fixed bin(35,0) dcl 115 ref 155 error_table_$noentry 000040 external static fixed bin(35,0) dcl 116 ref 134 expand_pathname_ 000010 constant entry external dcl 101 ref 124 get_pdir_ 000012 constant entry external dcl 102 ref 119 hcs_$status_minf 000014 constant entry external dcl 103 ref 128 header_str 000242 automatic structure level 1 unaligned dcl 77 set ref 164 165 165 internal_dsm_pn 000341 automatic char(168) unaligned dcl 78 set ref 119* 121* 124* 138 iocb_ptr parameter pointer dcl 67 set ref 18 139* 143* 146* 147* 154* 165* iox_$attach_name 000016 constant entry external dcl 104 ref 139 iox_$destroy_iocb 000020 constant entry external dcl 105 ref 147 iox_$detach_iocb 000022 constant entry external dcl 106 ref 146 iox_$open 000024 constant entry external dcl 107 ref 143 iox_$seek_key 000026 constant entry external dcl 108 ref 154 iox_$write_record 000030 constant entry external dcl 109 ref 165 key 000413 automatic varying char(256) dcl 79 set ref 153* 154* low builtin function dcl 90 ref 153 mrds_data_$dsmd_version_number 000042 external static fixed bin(17,0) dcl 117 ref 157 mrds_dsm_header based structure level 1 unaligned dcl 1-13 name 56 000242 automatic char(32) initial level 2 packed unaligned dcl 77 set ref 77* 160* null builtin function dcl 91 ref 139 139 num_of_relations 66 000242 automatic fixed bin(35,0) initial level 2 dcl 77 set ref 77* 161* record_length 000514 automatic fixed bin(21,0) dcl 80 set ref 154* 164* 165* size builtin function dcl 92 ref 164 substr builtin function dcl 93 ref 119 type 000515 automatic fixed bin(2,0) dcl 81 set ref 128* unique_chars_ 000032 constant entry external dcl 110 ref 119 139 NAMES DECLARED BY EXPLICIT CONTEXT. exit 000520 constant label dcl 168 ref 125 132 134 140 148 mrds_dsm_define_temp 000040 constant entry external dcl 18 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 714 760 522 724 Length 1176 522 44 201 172 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mrds_dsm_define_temp 394 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mrds_dsm_define_temp 000100 atd mrds_dsm_define_temp 000155 bit_count mrds_dsm_define_temp 000156 code mrds_dsm_define_temp 000157 dsm_dir mrds_dsm_define_temp 000231 dsm_entry mrds_dsm_define_temp 000242 header_str mrds_dsm_define_temp 000341 internal_dsm_pn mrds_dsm_define_temp 000413 key mrds_dsm_define_temp 000514 record_length mrds_dsm_define_temp 000515 type mrds_dsm_define_temp THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. expand_pathname_ get_pdir_ hcs_$status_minf iox_$attach_name iox_$destroy_iocb iox_$detach_iocb iox_$open iox_$seek_key iox_$write_record unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup error_table_$no_record error_table_$noentry mrds_data_$dsmd_version_number LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000034 72 000053 77 000056 119 000073 121 000155 124 000161 125 000206 128 000211 129 000250 131 000253 132 000256 134 000257 138 000262 139 000275 140 000355 143 000360 144 000377 146 000402 147 000413 148 000425 153 000426 154 000437 155 000455 157 000462 158 000464 159 000466 160 000471 161 000474 162 000475 164 000500 165 000502 168 000520 ----------------------------------------------------------- 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