COMPILATION LISTING OF SEGMENT display_mrds_db_version Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1011.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 /* HISTORY: 19* 20* Originally written by Jim Gray - - February 1980 21* Modified by Jim Gray - - April 1980, to add submodel capability. 22* 23* 81-01-22 Jim Gray : changed to take advantage of extended interface of 24* mrds_dsl_get_version$get_path_info, replacing the $header entry. 25* 26* 83-01-18 Roger Lackey : added mrds_error_$no_model_submodel to handle 27* the case where mrds_dsl_get_version$get_path_info 28* returns mrds_error_$no_database. Also declared undeclared variables. 29* 30**/ 31 32 display_mrds_db_version: dmdv: procedure (); 33 34 /* DESCRIPTION: 35* 36* This routine is to be called from command level, 37* to display the version number of a MRDS database, 38* given it's pathname, and the expanded pathname of that 39* database with a possible ".db" suffix, whether or not 40* the input pathname had the suffix. 41* NOTE: the user must have at least read access to the database model. 42* 43**/ 44 45 /* PARAMETERS: 46* 47* database_path - - (input) the relative pathname of the database, 48* with or without the ".db" suffix if the database has one. 49* 50* database_version - - (output) the version of the software and architecture 51* of the database whose pathname was given. 52* Additional information, such as creator, and time created are also given. 53* 54**/ 55 56 call cu_$arg_count (nargs); 57 if nargs ^= 1 then 58 call com_err_ (error_table_$wrong_no_of_args, caller_name, 59 "^/Usage: display_mrds_db_version database_pathnname^/"); 60 else do; 61 62 call cu_$arg_ptr (1, arg_ptr, arg_len, code); 63 if code ^= 0 then 64 call com_err_ (code, caller_name, 65 "^/Unable to get pathname argument.^/"); 66 else do; 67 68 area_ptr = addr (work_area); 69 call mrds_dsl_get_version$get_path_info (database_path, area_ptr, 70 mrds_path_info_structure_version, mrds_path_info_ptr, code); 71 if code ^= 0 then do; 72 if code = mrds_error_$no_database then 73 code = mrds_error_$no_model_submodel; 74 call com_err_ (code, caller_name, 75 "^/Unable to get database information using the path ""^a"".", mrds_path_info.absolute_path); 76 end; 77 else do; 78 79 if mrds_path_info.mrds_version > 1 | mrds_path_info.type.submodel then 80 call date_time_ (mrds_path_info.creation_time, time); 81 else do; 82 time = UNKNOWN; 83 mrds_path_info.creator_id = UNKNOWN; 84 end; 85 86 87 if mrds_path_info.type.submodel then 88 type = " Sub"; 89 else type = "Data"; 90 91 call ioa_ ("^/^a model: ^a^/^3xversion: ^d^/^3xcreated: ^a^/^8xby: ^a^/", 92 type, mrds_path_info.absolute_path, mrds_path_info.mrds_version, 93 time, mrds_path_info.creator_id); 94 95 end; 96 97 end; 98 99 end; 100 101 declare type char (4); /* either Sub or Data for datamodels or submodels */ 102 declare ioa_ entry options (variable); /* display to terminal subroutine */ 103 declare mrds_dsl_get_version$get_path_info entry (char (*), ptr, fixed bin, 104 ptr, fixed bin (35)); /* gets db get_path_info info */ 105 declare com_err_ entry options (variable); /* does error i/o */ 106 declare code fixed bin (35); /* error status encoding */ 107 declare database_path char (arg_len) based (arg_ptr); /* input pathname argument */ 108 declare date_time_ entry (fixed bin (71), char (*)); /* converts time to character form */ 109 declare cu_$arg_count entry (fixed bin); /* gets number of arguments */ 110 declare nargs fixed bin; /* argument count */ 111 declare cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)); /* gets character string arguments */ 112 declare caller_name char (24) init ("display_mrds_db_version"); /* name of calling routine */ 113 declare error_table_$wrong_no_of_args fixed bin (35) ext; /* arg count ^= 1 */ 114 dcl mrds_error_$no_database fixed bin (35) ext static; 115 dcl mrds_error_$no_model_submodel fixed bin (35) ext static; 116 declare arg_ptr ptr; /* pointer to pathname argument */ 117 declare arg_len fixed bin (21); /* length of pathname arg */ 118 declare time char (24); /* converted form of time */ 119 declare UNKNOWN char (24) init ("Unknown in this version."); 120 declare work_area area (1024); /* space for get_path_info structure */ 121 declare area_ptr ptr; /* pointer to work area */ 122 dcl addr builtin; 123 dcl empty builtin; 124 1 1 /* BEGIN INCLUDE FILE mrds_path_info.incl.pl1 - - Jim Gray 81-01-22 */ 1 2 1 3 /* HISTORY: 1 4* 1 5* 81-01-22 Jim Gray : originaly created for the dsl_$get_path_info interface, 1 6* a slight extension to the undocumented mrds_dsl_get_version$header. 1 7* 1 8**/ 1 9 1 10 /* DESCRIPTION: 1 11* 1 12* This structure returns information about a relative pathname, given 1 13* to a pathname accepting mrds interface. The information returned 1 14* is the absolute pathname, plus in the case that 1 15* the relative path points to a mrds database or submodel 1 16* whether it is a model or a submodel, the mrds version of 1 17* the model or submodel, it's creator, and the time of creation. 1 18* 1 19**/ 1 20 1 21 1 22 declare 1 mrds_path_info aligned based (mrds_path_info_ptr), 1 23 2 version fixed bin, /* version number for this structure */ 1 24 2 absolute_path char (168), /* the absolute path from the input relative path */ 1 25 2 type, 1 26 3 not_mrds bit (1) unal, /* on => path not to model or submodel */ 1 27 3 model bit (1) unal, /* on => path to database model, thus possible .db suffix */ 1 28 3 submodel bit (1) unal, /* on => path to submodel, thus possible .dsm suffix */ 1 29 3 mbz1 bit (33) unal, 1 30 2 mrds_version fixed bin, /* the mrds version number of the model or submodel */ 1 31 2 creator_id char (32), /* the person.project.tag of the creator */ 1 32 2 creation_time fixed bin (71), /* convert date to binary form of time model/submodel created */ 1 33 2 mbz2 bit (36) unal ; 1 34 1 35 1 36 declare mrds_path_info_ptr ptr ; 1 37 1 38 declare mrds_path_info_structure_version fixed bin init (1) int static options (constant) ; 1 39 1 40 /* END INCLUDE FILE mrds_path_info.incl.pl1 */ 125 126 127 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0906.2 display_mrds_db_version.pl1 >special_ldd>online>mrds.pbf-04/18/85>display_mrds_db_version.pl1 125 1 10/14/83 1608.8 mrds_path_info.incl.pl1 >ldd>include>mrds_path_info.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. UNKNOWN 000123 automatic char(24) initial unaligned dcl 119 set ref 82 83 119* absolute_path 1 based char(168) level 2 dcl 1-22 set ref 74* 91* addr builtin function dcl 122 ref 68 area_ptr 002132 automatic pointer dcl 121 set ref 68* 69* arg_len 000114 automatic fixed bin(21,0) dcl 117 set ref 62* 69 69 arg_ptr 000112 automatic pointer dcl 116 set ref 62* 69 caller_name 000103 automatic char(24) initial unaligned dcl 112 set ref 57* 63* 74* 112* code 000101 automatic fixed bin(35,0) dcl 106 set ref 62* 63 63* 69* 71 72 72* 74* com_err_ 000014 constant entry external dcl 105 ref 57 63 74 creation_time 66 based fixed bin(71,0) level 2 dcl 1-22 set ref 79* creator_id 55 based char(32) level 2 dcl 1-22 set ref 83* 91* cu_$arg_count 000020 constant entry external dcl 109 ref 56 cu_$arg_ptr 000022 constant entry external dcl 111 ref 62 database_path based char unaligned dcl 107 set ref 69* date_time_ 000016 constant entry external dcl 108 ref 79 empty builtin function dcl 123 ref 120 error_table_$wrong_no_of_args 000024 external static fixed bin(35,0) dcl 113 set ref 57* ioa_ 000010 constant entry external dcl 102 ref 91 mrds_dsl_get_version$get_path_info 000012 constant entry external dcl 103 ref 69 mrds_error_$no_database 000026 external static fixed bin(35,0) dcl 114 ref 72 mrds_error_$no_model_submodel 000030 external static fixed bin(35,0) dcl 115 ref 72 mrds_path_info based structure level 1 dcl 1-22 mrds_path_info_ptr 002134 automatic pointer dcl 1-36 set ref 69* 74 79 79 79 83 87 91 91 91 mrds_path_info_structure_version 000017 constant fixed bin(17,0) initial dcl 1-38 set ref 69* mrds_version 54 based fixed bin(17,0) level 2 dcl 1-22 set ref 79 91* nargs 000102 automatic fixed bin(17,0) dcl 110 set ref 56* 57 submodel 53(02) based bit(1) level 3 packed unaligned dcl 1-22 ref 79 87 time 000115 automatic char(24) unaligned dcl 118 set ref 79* 82* 91* type 000100 automatic char(4) unaligned dcl 101 in procedure "dmdv" set ref 87* 89* 91* type 53 based structure level 2 in structure "mrds_path_info" dcl 1-22 in procedure "dmdv" work_area 000132 automatic area(1024) dcl 120 set ref 68 120* NAMES DECLARED BY EXPLICIT CONTEXT. display_mrds_db_version 000146 constant entry external dcl 32 dmdv 000136 constant entry external dcl 32 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 626 660 463 636 Length 1070 463 32 173 143 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME dmdv 1218 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME dmdv 000100 type dmdv 000101 code dmdv 000102 nargs dmdv 000103 caller_name dmdv 000112 arg_ptr dmdv 000114 arg_len dmdv 000115 time dmdv 000123 UNKNOWN dmdv 000132 work_area dmdv 002132 area_ptr dmdv 002134 mrds_path_info_ptr dmdv THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr date_time_ ioa_ mrds_dsl_get_version$get_path_info THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$wrong_no_of_args mrds_error_$no_database mrds_error_$no_model_submodel LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 112 000122 119 000125 120 000130 32 000135 56 000154 57 000163 62 000213 63 000232 68 000261 69 000263 71 000316 72 000320 74 000325 76 000355 79 000356 82 000403 83 000406 87 000411 89 000420 91 000422 127 000462 ----------------------------------------------------------- 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