COMPILATION LISTING OF SEGMENT create_mrds_dm_include Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Multics Op. - System M Compiled on: 03/25/87 0948.9 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 12 /****^ HISTORY COMMENTS: 13* 1) change(85-11-21,Dupuis), approve(86-08-05,MCR7491), audit(86-08-08,Blair), 14* install(86-08-15,MR12.0-1127): 15* Provided a fix for phx19078 (mrds #150). PL/I doesn't accept 16* hyphens in names, but MRDS, COBOL, and other things do. Changed 17* the code to translate hyphens to underscores when generating a 18* PL/I include. 19* 2) change(86-11-21,Blair), approve(87-02-05,MCR7593), 20* audit(87-03-24,Gilcrease), install(87-03-25,MR12.1-1012): 21* Implement SCP6238 to allow creation of include files and tables for single 22* relations or a list of relations, and to name the output_files with a 23* control argument. 24* END HISTORY COMMENTS */ 25 26 27 create_mrds_dm_include: cmdmi: proc; 28 29 /* DESCRIPTION: 30* 31* *** create_mrds_dm_include (cmdmi) This entry creates an include 32* file from a MRDS data base model. The file is named ".incl.pl1". The include file contains a 34* structure for each relation with the attributes for each relation 35* declared as second level members of the structure. 36* 37* *** create_mrds_dm_table (cmdmt) This entry creates a sement 38* displaying the relations in a data base model suitable for 39* printing on a line printer. The display for each relation is a 40* series of rectangular boxes, each containing the name of an 41* attribute. If the attribute is a primary key, a "*" appears in 42* the upper left corner. If the attribute is a secondary index, a 43* "O" will appear in the upper right corner. 44**/ 45 46 /* HISTORY: 47* 48* created 78 September by Art Beattie 49* 50* Modified by Jim Gray - - Dec. 1979, to change 51* mrds_cmdb_alpha_desc to mu_display_descriptor, so that 52* the new data types could be handled. 53* 54* Modified by Jim Gray - - Jan. 1980, to put descriptor abbrev 55* function in mu_trim_descriptor, to handle new descriptor 56* lengths 57* 58* Modified by Jim Gray - - Jan. 1980, to handle ".db" suffix on 59* databases 60* 61* Modified by Jim Gray - - April 1980, to work with submodels. 62* 63* Modified by Jim - - 80-9-23, to work with databases/submodels 64* that have a -decode_dcl user view of the data declared. The entry 65* $set_user_view in mrds_dm_get_attributes returns the user view 66* instead of the db view in the descriptor, if they differ. 67* 68* 80-12-12 Jim Gray : Changed to use actual entry name given in 69* users link or addname, rather than surprising him with a 70* different name on the database for his include or table segment 71* name. Changed the header path to be the actual database path. 72* 73* 80-12-19 Jim Gray : added -based control argument to CMDMI. 74* changed version number from 2.0 to 3.0. 75* 76* 80-12-30 Jim Gray : added force iox_$close/detach in clean up 77* handler, for cases where error occurs, and this has not been done 78* yet. 79* 80* 81-1-6 Jim Gray : changed usage message so valid control args 81* shown for cmdmi and cmdmt. 82* 83* 81-01-28 Davids: removed mrds_dsm_display_rels.incl.pl1 which was 84* not being used. The code uses the model_relation structure which 85* has the same format as the dsm_display_rels structure. Since the 86* format of the structures is fixed because of user documentation 87* it does not matter which structure is used. 88* 89* 81-01-31 Jim Gray : added use of 90* mrds_dsl_get_version$get_path_info in place of 91* dsl_$get_db_version, to take advantage of the improved interface. 92* 93* 81-02-10 Jim Gray : added check for a peon using a secured 94* submodel once the database has become secured. 95* 96* 81-02-11 Jim Gray : changed name of dsmd_, to mrds_dsm_dsmd, so 97* that the internal, not extenral name in the bound segment was 98* called. 99* 100* 81-04-27 Jim Gray : added -long|-lg and -no_based control 101* arguments. Also made a non-DBA looking at secured db see only 102* indexed flag, no key flags. 103* 104* 81-06-05 Davids: removed references to the external user submodel 105* interface and replaced them with references to internal mrds 106* interfaces (this includes both include files and modules). Also 107* removed declared but never referenced variables. Changed error 108* messages to use the actual name of the mrds_dsm_* module being 109* called rather than the dsmd_* name that used to be called. Solved 110* the problem of mrds_dsm_relation_names being overlayed with 111* model_relations by allocating a model_relations structure and 112* copying the contents of mrds_dsm_relations_names into 113* model_relations. If any submodel relation name is longer than 32 114* characters (not currently possible) it will not be copied 115* correctly. 116* 117* 81-10-21 Davids: Corrected the handling of add names and links so 118* that the name of the created segment depends of the name used in 119* the command line and not the actual name of the database or data 120* submodel. 121* 122* 83-01-10 Roger Lackey : Changed out_dir to always be working dir. 123* 124* 83-01-18 Roger Lackey : added mrds_error_$no_model_submodel to handle 125* the case where mrds_dsl_get_version$get_path_info 126* returns mrds_error_$no_database. Also declared undeclared variables. 127* 128* 83-07-12 Roger Lackey: Changed call to tssi_$finish_segment to put 129* rw access on output segment for caller. 130* 131* 84-02-15 Mike Kubicar: Fixed tr phx16539. When displaying a submodel, 132* cmdmi (and cmdmt) would always use the domains of the model in attribute 133* order, no matter what the order of the attributes in the submodel was. 134* The result was that attributes in a submodel would have have the wrong 135* domains associated with them. 136* 137**/ 138 139 /* Identify entry point used. */ 140 prog_name = "create_mrds_dm_include"; 141 creating_incl = ON; 142 line_len = 110; 143 go to COMMON; 144 145 create_mrds_dm_table: cmdmt: entry; 146 prog_name = "create_mrds_dm_table"; 147 creating_incl = no; 148 line_len = 136; 149 /* Common code for all entries. */ 150 COMMON: 151 /* Initialize variables. */ 152 attr_desc_ptr = null; 153 based_decls = OFF; 154 brief_table = no; 155 dm_path = ""; 156 dm_ptr = null; 157 dmh_ptr = null; 158 expect = 0; 159 legend_len = 38; 160 have_of = no; 161 have_relation = no; 162 mr_order_ptr = null; 163 mr_ptr = null; 164 ordering = no; 165 order_begin, order_end = 0; 166 out_ptr, out_acl_ptr = null; 167 page_len = 59; 168 rd_ptr = null; 169 submodel = OFF; 170 str_ptr = null (); 171 hd_ptr = null (); 172 new_rd_ptr = null (); 173 /* Obtain number of arguments in this call. */ 174 call cu_$arg_count (nargs); 175 if nargs < 1 then do; 176 code = error_table_$wrong_no_of_args; 177 if creating_incl then 178 options = "-based, -no_based, -order, -output_file, -page_length and/or -relation"; 179 else options = "-brief, -long, -line_length, -order, -output-file, -page_length and/or -relation"; 180 call ioa_$rsnnl ( 181 "^/Usage is: ^a dm_path {-control_args}^/where control_args can be ^a", 182 er_mess, 0, prog_name, options); 183 go to ERROR; 184 end; 185 /* The first argument is the pathname of the data base. */ 186 call cu_$arg_ptr (1, arg_ptr, arg_len, 0); 187 188 /* BEGIN CHANGE 81-01-31 ************************************************** */ 189 190 path_argument = arg; 191 call mrds_dsl_get_version$get_path_info ((arg), addr (local_area), 192 mrds_path_info_structure_version, mrds_path_info_ptr, 193 code); /* get full path, with .db suffix if needed */ 194 if mrds_path_info_ptr = null () then 195 dm_path = arg; 196 else do; 197 dm_path = mrds_path_info.absolute_path; 198 db_version = mrds_path_info.mrds_version; 199 end; 200 if code ^= 0 then do; 201 if code = mrds_error_$no_database then 202 code = mrds_error_$no_model_submodel; 203 204 call ioa_$rsnnl ("^/No database found using the data model path ""^a"".", 205 er_mess, 0, dm_path); 206 goto ERROR; 207 end; 208 209 if mrds_path_info.type.submodel then 210 submodel = ON; 211 212 /* END CHANGE 81-01-31 ********************************************** */ 213 214 /* Scan the arguments which are not position sensitive. */ 215 do iarg = 2 to nargs; 216 call cu_$arg_ptr (iarg, arg_ptr, arg_len, 0); 217 RECHECK_ARG: 218 if expect = 0 then do; 219 /* Next argument doesn't follow a previously processed control */ 220 /* argument. */ 221 if arg = "-relation" | arg = "-rel" then 222 expect = rel_name_arg; 223 else if arg = "-of" | arg = "-output_file" then 224 expect = output_file_arg; 225 else if arg = "-brief" | arg = "-bf" | arg = "-long" | arg = "-lg" then do; 226 if arg = "-brief" | arg = "-bf" then 227 brief_table = ON; 228 if creating_incl then call ioa_ ("^a: The ^a control argument is ignored by this command.", 229 prog_name, arg); 230 end; 231 else if arg = "-line_length" then go to HAVE_LL_CTL; 232 else if arg = "-ll" then do; 233 234 HAVE_LL_CTL: 235 if creating_incl then do; 236 call ioa_ ("^a: The ^a control argument is ignored by this command.", prog_name, arg); 237 iarg = iarg + 1; 238 end; 239 else expect = ll_arg; 240 end; 241 else if arg = "-page_length" then expect = pl_arg; 242 else if arg = "-pl" then expect = pl_arg; 243 else if arg = "-order" then do; 244 expect = order_arg; 245 ordering = ON; 246 order_begin = 0; 247 end; 248 else if arg = "-based" | arg = "-no_based" then do; 249 if arg = "-based" then 250 based_decls = ON; 251 if ^creating_incl then do; 252 call ioa_$rsnnl ("^/The ""-based"" control argument is ignored by this command.", er_mess, 0); 253 code = error_table_$badopt; 254 goto ERROR; 255 end; 256 end; 257 else if substr (arg, 1, 1) = "-" then do; 258 call ioa_$rsnnl ("^/Unrecognized control argument, ^a", er_mess, 0, arg); 259 code = error_table_$badopt; 260 go to ERROR; 261 end; 262 else do; /* Pathname already given. Might be an error. */ 263 call ioa_$rsnnl ("^/Bad syntax in this call at the argument, ^a", er_mess, 0, arg); 264 code = error_table_$badopt; 265 go to ERROR; 266 end; 267 control_arg = arg; 268 end; /* Ends do if not expecting. */ 269 270 271 else do; /* Current arg occurs after control arg requiring one. */ 272 if expect = output_file_arg then do; 273 out_entry_name = arg; 274 have_of = ON; 275 expect = 0; 276 end; 277 if expect = ll_arg then do; 278 /* Expecting argument after -line_length control argument. */ 279 on conversion call conv_error (); 280 line_len = convert (line_len, arg); 281 revert conversion; 282 if (^creating_incl & line_len < 64) | (creating_incl & line_len < 100) | line_len > 136 then do; 283 call ioa_$rsnnl ("^/Value of line length argument is out of the range, 63 127 then do; 297 call ioa_$rsnnl ("^/^a ^d", er_mess, 0, 298 "Value of page length argument can be 0 or in the range 29 order_end then go to MISSING_VALUE; 316 go to RECHECK_ARG; 317 end; 318 if iarg = nargs then do; /* Since this is the last argument, remember its position. */ 319 order_end = iarg; 320 expect = 0; 321 end; 322 end; /* Ends do if expect = order_arg. */ 323 end; /* Ends do if expecting. */ 324 end; /* Ends do for iarg loop. */ 325 /* Check for overall syntaxical errors. */ 326 if expect ^= 0 then do; 327 328 MISSING_VALUE: 329 code = error_table_$noarg; 330 call ioa_$rsnnl ("^/Required value for ^a control argument is missing.", er_mess, 0, control_arg); 331 go to ERROR; 332 end; 333 if ordering then 334 if have_relation then do; 335 code = error_table_$inconsistent; 336 call ioa_$rsnnl ("^/Inconsistent combination of arguments, -relation and -order.", er_mess, 0); 337 go to ERROR; 338 end; 339 else if order_begin = 0 then do; /* No names were supplied after -order argument. */ 340 control_arg = "-order"; 341 go to MISSING_VALUE; 342 end; 343 344 call expand_pathname_ (dm_path, dm_dir, dm_entry_name, code); 345 if code ^= 0 then do; 346 call ioa_$rsnnl ("^/Error occured in expanding pathname for, ^a", 347 er_mess, 0, dm_path); 348 go to ERROR; 349 end; 350 351 /* Prefer to have actual pathname of data model. */ 352 call hcs_$get_link_target (dm_dir, dm_entry_name, dm_adir, dm_aentry_name, code); 353 if code ^= 0 then do; 354 call ioa_$rsnnl ("^/Error occured in obtaining link target for , ^a>^a", 355 er_mess, 0, dm_dir, dm_entry_name); 356 go to ERROR; 357 end; 358 /* This is mostly for error messages. */ 359 dm_abs_path = rtrim (dm_adir) || ">" || dm_aentry_name; 360 /* Create proper suffix for output file name. */ 361 if creating_incl then suffix = "incl.pl1"; 362 else suffix = "table"; 363 if submodel then 364 entry_suffix = "dsm"; 365 else entry_suffix = "db"; 366 367 /* CHANGE: use entry name given, not actual database name */ 368 369 if ^have_of then do; 370 call expand_pathname_ (path_argument, out_dir, out_entry_name, code); 371 if code ^= 0 then do; 372 call ioa_$rsnnl ("^/Tried to expand pathname, ^a.^a, in working directory.", 373 er_mess, 0, dm_entry_name, suffix); 374 go to ERROR; 375 end; 376 end; 377 378 out_dir = get_wdir_ (); /* Always put output in working_dir */ 379 380 call suffixed_name_$new_suffix ((out_entry_name), (entry_suffix), suffix, out_entry_name, code); 381 if code ^= 0 then do; 382 call ioa_$rsnnl ("^/Tried to change suffix on ^a.^a, in working directory.", 383 er_mess, 0, dm_entry_name, suffix); 384 go to ERROR; 385 end; 386 387 /* Need some working storage. */ 388 dm_area_ptr = get_system_free_area_ (); 389 /* Open the data model for reading only. */ 390 if submodel then do; 391 sm_abs_path = dm_abs_path; 392 call mrds_dsm_open$read (dm_path, submodel_iocb_ptr, code); 393 if code ^= 0 then do; 394 call ioa_$rsnnl ("^/Unable to open the submodel, ^a", 395 er_mess, 0, dm_path); 396 goto ERROR; 397 end; 398 399 call mrds_dsm_read_header (dm_area_ptr, hd_ptr, submodel_iocb_ptr, code); 400 if hd_ptr = null () | code ^= 0 then do; 401 call ioa_$rsnnl ("^/Unable to get header info from mrds_dsm_read_header for submodel, ^a", 402 er_mess, 0, dm_abs_path); 403 goto ERROR; 404 end; 405 406 /* make a phony dm_header, with submodel info in it */ 407 408 allocate dm_header set (dmh_ptr) in (dm_area); 409 410 dmh_ptr -> dm_header.dm_header_id = "SUBMODEL"; 411 dmh_ptr -> dm_header.dmd_version = hd_ptr -> mrds_dsm_header.dsm_generator_version; 412 dmh_ptr -> dm_header.creator_id = hd_ptr -> mrds_dsm_header.creator_id; 413 dmh_ptr -> dm_header.create_time = hd_ptr -> mrds_dsm_header.date_time_generated; 414 415 end; 416 417 if submodel then 418 model_path = hd_ptr -> mrds_dsm_header.database_pn; 419 else model_path = dm_abs_path; /* CHANGE: use actual not given path in header */ 420 421 call mrds_dm_open ((model_path), retrieval, dm_ptr, code); 422 if dm_ptr = null | code ^= 0 then do; 423 call ioa_$rsnnl ("^/Received a null pointer from dmd_$open_dm for data model, ^a", 424 er_mess, 0, model_path); 425 go to ERROR; 426 end; 427 on cleanup call clean_up (); /* Got to start thinking about cleaning this up if anything */ 428 /* goes wrong. */ 429 430 /* Get header information from data model for title block. */ 431 if ^submodel then do; 432 call mrds_dm_get_header (dm_ptr, dm_area_ptr, dmh_ptr, code); 433 if dmh_ptr = null () | code ^= 0 then do; 434 call ioa_$rsnnl ("^/Unable to get header info from dmd_$get_header for data model, ^a", 435 er_mess, 0, model_path); 436 goto ERROR; 437 end; 438 439 end; 440 call date_time_ (create_time, time_str); 441 /* Want to put current time into title block. */ 442 call date_time_ ((clock_ ()), current_date_time); 443 /* Setup basic title block. */ 444 445 /* BEGIN CHANGE 81-02-10 ********************************************** */ 446 /* check to see if the database is secured */ 447 448 secured_view = OFF; 449 if dmd_version >= 4 then do; 450 451 call mrds_dm_db_secured$get_secured_status (dm_ptr, addr (local_area), 452 database_state_structure_version, database_state_ptr, code); 453 if code ^= 0 then do; 454 call ioa_$rsnnl ("^/Unable to get secured state of database ^a", 455 er_mess, 0, model_path); 456 goto ERROR; 457 end; 458 459 if database_state.secured then do; 460 461 /* check for correct authorization and usage, 462* a DBA can do anything, a peon must be using a secure submodel */ 463 464 call mrds_dm_authorization$get_user_class (model_path, addr (local_area), 465 mrds_authorization_structure_version, mrds_authorization_ptr, code); 466 if code ^= 0 then do; 467 call ioa_$rsnnl ("^/Unable to get user class for database ^a", 468 er_mess, 0, model_path); 469 goto ERROR; 470 end; 471 472 if mrds_authorization.administrator then ; /* user is a DBA */ 473 else do; 474 475 /* must check that peon is using a secure submodel */ 476 477 secured_view = ON; 478 secure_submodel = OFF; 479 if ^submodel then ; 480 else if mrds_dm_secured_submodel ( 481 rtrim (model_path), rtrim (dm_adir), rtrim (dm_aentry_name)) then 482 secure_submodel = ON; 483 484 if ^secure_submodel then do; 485 if submodel then 486 call ioa_$rsnnl ("^/^a^a^a^a^a ^a^a^a", er_mess, 0, 487 "The submodel """, sm_abs_path, """ refers to a database """, 488 model_path, """ that has been secured,", 489 "but the submodel itself is not in the databases inferior directory """, 490 mrds_data_$submodel_dir_name, """."); 491 else call ioa_$rsnnl ("^/^a^a^a ^a", er_mess, 0, 492 "The database """, model_path, """ has been secured,", 493 "but the caller is not a DBA, and must use a submodel to reference it."); 494 code = mrds_error_$inc_secure_open; 495 goto ERROR; 496 end; 497 498 end; 499 500 end; 501 502 end; 503 504 /* END CHANGE 81-02-10 ***************************************************** */ 505 506 /* set up output header */ 507 508 lines_left = page_len; 509 buf = ""; 510 511 if submodel then 512 model_type = " Sub"; 513 else model_type = "Data"; 514 515 call ioa_$rsnnl ("^3x* BEGIN ^a", buf (3), 0, out_entry_name); 516 call ioa_$rsnnl ("^3x*^6xcreated: ^a", buf (4), 0, current_date_time); 517 call ioa_$rsnnl ("^3x*^11xby: ^a (^a)", buf (5), 0, prog_name, version); 518 519 /* CHANGE: using actual path of model in header, rather than path given */ 520 521 if submodel then 522 call ioa_$rsnnl ("^3x* ^a model ^a", buf (7), 0, model_type, sm_abs_path); 523 else call ioa_$rsnnl ("^3x* ^a model ^a", buf (7), 0, model_type, model_path); 524 call ioa_$rsnnl ("^3x*^6xcreated: ^a", buf (8), 0, time_str); 525 call ioa_$rsnnl ("^3x*^6xversion: ^d", buf (9), 0, dmd_version); 526 call ioa_$rsnnl ("^3x*^11xby: ^a", buf (10), 0, dm_header.creator_id); 527 /* Determine longest line in title block to find out where */ 528 /* right side of box is. */ 529 max_buf_len = length (buf (3)); 530 do i = 4 to 10; 531 max_buf_len = max (max_buf_len, length (buf (i))); 532 end; 533 /* Put right side of title block in. */ 534 do i = 3 to 10; 535 buf (i) = buf (i) || copy (" ", max_buf_len + 1 - length (buf (i))) || "*"; 536 end; 537 /* Now for the top side of title block. */ 538 er_mess = copy ("*", max_buf_len - 1); 539 call ioa_$rsnnl ("/* ^a", buf (1), 0, er_mess); 540 /* Finially, the bottom side. */ 541 call ioa_$rsnnl ("^3x*^vx*", buf (2), 0, max_buf_len - 3); 542 call ioa_$rsnnl ("^3x^a */", buf (12), 0, er_mess); 543 /* Put some blank separator lines in title block for */ 544 /* appearances. */ 545 buf (6), buf (11) = buf (2); 546 /* Ready to access output segment, so lets try to get it. */ 547 548 call tssi_$get_segment (out_dir, out_entry_name, out_ptr, out_acl_ptr, code); 549 if out_ptr = null then do; 550 call ioa_$rsnnl ("^/Received a null pointer to segment, ^a>^a", 551 er_mess, 0, out_dir, out_entry_name); 552 go to ERROR; 553 end; 554 /* Attach an output stream to output segment. */ 555 out_atd = "vfile_ " || rtrim (out_dir) || ">" || rtrim (out_entry_name); 556 call iox_$attach_name ((unique_chars_ (no)), out_iocb_ptr, (out_atd), null, code); 557 if code ^= 0 then do; 558 call ioa_$rsnnl ("^/Attaching switch to ^a,>^a", er_mess, 0, out_dir, out_entry_name); 559 go to ERROR; 560 end; 561 call iox_$open (out_iocb_ptr, stream_out, "0"b, code); 562 if code ^= 0 then do; 563 call ioa_$rsnnl ("^/Opening switch to ^a>^a", er_mess, 0, out_dir, out_entry_name); 564 go to ERROR; 565 end; 566 /* Output the title block. */ 567 /* If creating a table, put legend along side of title block, */ 568 /* otherwise below it. */ 569 if creating_incl then call output_buffer (0, 12); 570 else do; 571 below_sw = no; 572 if legend_len + max_buf_len + 2 > line_len then do; 573 /* Put legend below title box. */ 574 call output_buffer (0, 12); 575 below_sw = ON; 576 buf = ""; 577 end; 578 /* Construct the legend. */ 579 buf (2) = buf (2) || " L_E_G_E_N_D_:"; 580 buf (3) = buf (3) || copy (" ", 11) || copy ("_", 15) || "/ /_" || copy ("_", 8); 581 buf (4) = buf (4) || copy (" ", 11) || "|*" || copy (" ", 9) || "I| / / | |"; 582 buf (5) = buf (5) || " relation | Attribute | | |"; 583 i = 0; 584 if ^brief_table then do; 585 buf (6) = buf (6) || copy (" ", 11) || "| Data Type | | |"; 586 i = 1; 587 end; 588 buf (6 + i) = buf (6 + i) || copy (" ", 11) || "_|" || copy ("_", 11) || "_|__/ /___|______|"; 589 buf (7 + i) = buf (7 + i) || copy (" ", 25) || "/ /"; 590 buf (8 + i) = buf (8 + i) || copy (" ", 11) || "* = Key Attribute"; 591 buf (9 + i) = buf (9 + i) || copy (" ", 11) || "I = Index Attribute"; 592 if below_sw then call output_buffer (0, 9 + i); 593 else call output_buffer (0, 12); 594 end; /* Ends do if generating display table. */ 595 /* Get all the relation names. */ 596 597 /* get the relations in this view */ 598 599 if ^submodel then do; 600 call mrds_dm_get_relations (dm_ptr, dm_area_ptr, mr_ptr, code); 601 if mr_ptr = null | code ^= 0 then do; 602 call ioa_$rsnnl ("^/Received null pointer from dmd_$get_relations for data model, ^a", 603 er_mess, 0, model_path); 604 go to ERROR; 605 end; 606 end; 607 608 else do; /* for submodels */ 609 610 call mrds_dsm_get_relation_names (dm_area_ptr, mrds_dsm_relation_names_ptr, submodel_iocb_ptr, code); 611 if mrds_dsm_relation_names_ptr = null () | code ^= 0 then do; 612 call ioa_$rsnnl ("^/Unable to get relation names from mrds_dsm_get_relation_names for submodel, ^a", 613 er_mess, 0, model_path); 614 goto ERROR; 615 end; 616 num_relations_alloc = mrds_dsm_relation_names.nrels; 617 allocate model_relations in (dm_area) set (mr_ptr); 618 do i = 1 to num_relations_alloc; 619 model_relations.relation_name (i) = mrds_dsm_relation_names.relation (i); 620 end; 621 free mrds_dsm_relation_names_ptr -> mrds_dsm_relation_names in (dm_area); 622 end; 623 624 if ordering | have_relation then do; /* Special ordering has been requested. */ 625 num_relations_alloc, nrelations = model_relations.nrels; 626 norder = order_end - order_begin + 1; 627 if model_relations.nrels < norder then do; /* Can't order something that isn't there. */ 628 code = error_table_$badcall; 629 call ioa_$rsnnl ("^/^a model has fewer relations (^d) than order list (^d).", 630 er_mess, 0, model_type, model_relations.nrels, norder); 631 go to ERROR; 632 end; 633 /* Set up some wroking storage to order the names in. */ 634 allocate model_relations in (dm_area) set (mr_order_ptr); 635 if have_relation then mr_order_ptr -> model_relations.nrels = norder; 636 /* Go over the argument list to put the names into the new */ 637 /* storage. */ 638 i = 0; 639 do iarg = order_begin to order_end; 640 call cu_$arg_ptr (iarg, arg_ptr, arg_len, 0); 641 i = i + 1; 642 mr_order_ptr -> relation_name (i) = arg; 643 end; 644 do i = 1 to norder; /* For each name in the ordered list, find it in */ 645 do j = 1 to model_relations.nrels; /* the data model list and zip it out. */ 646 if mr_order_ptr -> relation_name (i) = relation_name (j) then do; 647 relation_name (j) = ""; 648 go to NEXT_ORDER; 649 end; 650 end; /* Ends do for model_relations.nrels loop. */ 651 call ioa_$rsnnl ("^/Order list entry, ""^a"", wasn't found in model, ^a.", 652 er_mess, 0, mr_order_ptr -> relation_name (i), model_path); 653 code = error_table_$bad_arg; 654 go to ERROR; 655 656 NEXT_ORDER: 657 end; /* Ends do for norder loop. */ 658 /* Now copy those names that weren't zipped out. */ 659 if ordering then do; 660 j = norder; 661 do i = 1 to model_relations.nrels; 662 if relation_name (i) ^= " " then do; 663 j = j + 1; 664 mr_order_ptr -> relation_name (j) = relation_name (i); 665 end; 666 end; /* Ends do for model_relations.nrels loop. */ 667 end; 668 free model_relations in (dm_area); /* All done with original structure. */ 669 mr_ptr = mr_order_ptr; /* Setup reference to new sturcture as if it was the old one. */ 670 mr_order_ptr = null; 671 end; /* Ends do if ordering. */ 672 /* Determine length of longest relation name. */ 673 674 /* go through all relations */ 675 676 max_rel_name_len = length (rtrim (relation_name (1))); 677 do i = 2 to model_relations.nrels; 678 max_rel_name_len = max (max_rel_name_len, length (rtrim (relation_name (i)))); 679 end; 680 do rltn = 1 to model_relations.nrels while (relation_name(rltn) ^= " "); 681 682 if ^submodel then ; 683 else do; 684 call mrds_dsm_read_relation ((relation_name (rltn)), dm_area_ptr, str_ptr, submodel_iocb_ptr, code); 685 if code ^= 0 | str_ptr = null () then do; 686 call ioa_$rsnnl ("^/Unable to get attribute information from mrds_dsm_read_relation for submodel, ^a", 687 er_mess, 0, model_path); 688 goto ERROR; 689 end; 690 691 end; 692 693 if submodel then 694 model_name = str_ptr -> relation_block.dm_rel_name; 695 else model_name = relation_name (rltn); 696 697 call mrds_dm_get_attributes$set_user_view (); 698 call mrds_dm_get_attributes (dm_ptr, model_name, dm_area_ptr, rd_ptr, code); 699 call mrds_dm_get_attributes$set_db_view (); 700 if rd_ptr = null | code ^= 0 then do; 701 call ioa_$rsnnl ("^/Received a null pointer from dmd_$get_attributes for data model, ^a", 702 er_mess, 0, model_path); 703 go to ERROR; 704 end; 705 /* Convert descriptor to ASCII in standard format. */ 706 buf_next_column = max_rel_name_len + 3; 707 right_margin = 5; 708 row = 1; 709 710 if submodel then do; /* make a new attr list of only submodel attrs */ 711 712 num_attr_alloc = str_ptr -> relation_block.no_rb_attributes; 713 714 allocate rel_desc set (new_rd_ptr) in (dm_area); 715 716 unspec (new_rd_ptr -> rel_desc) = "0"b; 717 new_rd_ptr -> rel_desc.num_attr = num_attr_alloc; 718 719 /* change the model attribute names to those of the submodel */ 720 721 do sm_attr_num = 1 to num_attr_alloc; 722 723 found = OFF; 724 attr_num = 1; 725 do while (^found); 726 727 if rd_ptr -> rel_desc.attributes (attr_num).attribute_name = 728 str_ptr -> relation_block.attribute_info (sm_attr_num).dm_attr_name then do; 729 found = ON; 730 new_rd_ptr -> rel_desc.attributes (sm_attr_num) = 731 rd_ptr -> rel_desc.attributes (attr_num); 732 new_rd_ptr -> rel_desc.attributes (sm_attr_num).attribute_name = 733 str_ptr -> relation_block.attribute_info (sm_attr_num).dsm_attr_name; 734 end; 735 else if attr_num < rd_ptr -> rel_desc.num_attr then 736 attr_num = attr_num + 1; 737 else do; 738 found = ON; 739 call ioa_$rsnnl ("^/Unable to find submodel relation ""^a"" in the data model, ^a", 740 er_mess, 0, str_ptr -> relation_block.attribute_info (sm_attr_num).dsm_attr_name, 741 model_path); 742 goto ERROR; 743 end; 744 745 end; 746 747 end; 748 749 free rd_ptr -> rel_desc in (dm_area); 750 rd_ptr = new_rd_ptr; 751 new_rd_ptr = null (); 752 753 end; 754 755 /* set up column and box length parameters */ 756 757 allocate attr_descriptors in (dm_area); 758 759 do attr = 1 to num_attr; 760 761 762 attr_desc (attr) = mu_display_descriptor (addr (descriptor (attr))); 763 if creating_incl then do; 764 i = index (attr_desc (attr), "leading sign"); 765 if i = 0 then ; 766 else attr_desc (attr) = /* remove part of comment to shorten line */ 767 substr (attr_desc (attr), 1, i - 1) || substr (attr_desc (attr), i + 13); 768 end; 769 else do; 770 /* Prescan attributes and determine if this relation will fit */ 771 /* on current page. No output is done here. */ 772 box_len = length (rtrim (attribute_name (attr))); 773 if ^brief_table then do; 774 attr_desc (attr) = mu_trim_descriptor (attr_desc (attr)); 775 box_len = max (length (attr_desc (attr)), box_len); 776 end; 777 if j = num_attr then right_margin = 3; 778 if box_len + right_margin > line_len + 1 - buf_next_column then do; 779 /* Have to go to another row of boxes. */ 780 buf_next_column = max_rel_name_len + 10; 781 row = row + 1; 782 end; 783 buf_next_column = buf_next_column + box_len + 3; 784 end; /* Ends do if creating a table. */ 785 end; /* Ends do for num_attr loop. */ 786 /* Determine if a new page is required to display current */ 787 /* relation. */ 788 if creating_incl then 789 if num_attr + 2 > lines_left then call new_page (); 790 else ; 791 else if brief_table & (row * 4 + 1 > lines_left) | ^brief_table & (row * 5 + 1 > lines_left) then call new_page (); 792 blank_lines = 1; 793 if creating_incl then do; /* This is all that is needed for an include file. */ 794 call ioa_$rsnnl ("dcl 1 ^a aligned^[ based^;^],", buf (1), 0, 795 translate (relation_name (rltn), "_", "-"), based_decls); 796 call output_buffer (blank_lines, 1); 797 end; 798 else do; /* Setup begining of line for table display. */ 799 buf_next_column = max_rel_name_len + 3; 800 buf (1) = copy (" ", max_rel_name_len + 1) || "_"; 801 buf (2), buf (4) = copy (" ", max_rel_name_len + 1) || "|"; 802 call ioa_$rsnnl ("^vx^a |", buf (3), 0, 803 max_rel_name_len - length (rtrim (relation_name (rltn))), rtrim (relation_name (rltn))); 804 buf (5) = copy (" ", max_rel_name_len + 1) || "_|"; 805 end; 806 right_margin = 5; 807 808 /* go through all attributes */ 809 810 do attr = 1 to num_attr; /* Do each attribute in turn. */ 811 812 /* BEGIN CHANGE 81-04-27 ******************************************* */ 813 814 /* map key heads to indexed, and other key attrs to data only 815* for a secured database being viewed by a non-DBA, 816* to avoid a security violation possible if the user knows key info */ 817 818 if key_flag (attr) & secured_view then do; 819 820 key_flag (attr) = OFF; 821 822 if key_attr_order (attr) = 1 then 823 inver_flag (attr) = ON; 824 825 end; 826 827 /* END CHANGE 81-04-27 *************************************************** */ 828 829 if creating_incl then do; /* No line in incl file will be over 126 chars. */ 830 call ioa_$rsnnl ("^6x2 ^a ^a^[;^;,^]^[^vx/* ^[Key^]^[, ^]^[Index^] */^]", buf (1), 0, 831 translate (attribute_name (attr), "_", "-"), attr_desc (attr), (attr = num_attr), 832 (key_flag (attr) | inver_flag (attr)), 833 max (2, 98 - length (rtrim (attribute_name (attr))) - length (attr_desc (attr))), key_flag (attr), 834 (key_flag (attr) & inver_flag (attr)), inver_flag (attr)); 835 call output_buffer (0, 1); 836 end; 837 else do; /* This is what has to be done for each attribute in a */ 838 /* table display. */ 839 box_len = length (rtrim (attribute_name (attr))); 840 if ^brief_table then box_len = max (length (attr_desc (attr)), box_len); 841 /* Don't have to worry about right hand continuations if this */ 842 /* is last attribute. */ 843 if j = num_attr then right_margin = 3; 844 if box_len + right_margin > line_len + 1 - buf_next_column then do; 845 /* Box won't fit. Indicate continuation. */ 846 buf (1) = buf (1) || "__"; 847 buf (5) = buf (5) || "__"; 848 i = 1; 849 if brief_table then do; 850 i = 0; 851 buf (4) = buf (5); 852 end; 853 /* Send it out to segment. */ 854 call output_buffer (blank_lines, 4 + i); 855 /* Start next row of boxes. */ 856 buf (1) = copy (" ", max_rel_name_len + 6) || "___"; 857 do b = 2 to 4; 858 buf (b) = copy (" ", max_rel_name_len + 8) || "|"; 859 end; 860 buf (5) = copy (" ", max_rel_name_len + 6) || "___|"; 861 buf_next_column = max_rel_name_len + 10; 862 end; /* Ends do if overflowed right side of page. */ 863 /* Construct top of box. */ 864 buf (1) = buf (1) || copy ("_", box_len + 3); 865 /* Indicate if attribute is keyed and/or secondary. */ 866 call ioa_$rsnnl ("^[*^; ^]^vx^[I^; ^]|", er_mess, 0, key_flag (attr), box_len, inver_flag (attr)); 867 buf (2) = buf (2) || er_mess; 868 /* Now comes the attribute name. */ 869 call ioa_$rsnnl (" ^va |", er_mess, 0, box_len, attribute_name (attr)); 870 buf (3) = buf (3) || er_mess; 871 /* If wanted, the descriptor info goes in next. */ 872 if ^brief_table then do; 873 call ioa_$rsnnl (" ^va |", er_mess, 0, box_len, attr_desc (attr)); 874 buf (4) = buf (4) || er_mess; 875 end; 876 /* The bottom of the box is last. */ 877 buf (5) = buf (5) || copy ("_", box_len + 2) || "_|"; 878 buf_next_column = buf_next_column + box_len + 3; 879 end; /* Ends do for table generation. */ 880 end; /* Ends do for num_attr loop. */ 881 if ^creating_incl then do; /* Output anything left in output buffer. */ 882 i = 1; 883 if brief_table then do; 884 i = 0; 885 buf (4) = buf (5); 886 end; 887 call output_buffer (blank_lines, 4 + i); 888 end; 889 890 if submodel then do; 891 free str_ptr -> relation_block in (dm_area); 892 str_ptr = null (); 893 end; 894 free rd_ptr -> rel_desc in (dm_area); 895 rd_ptr = null (); 896 free attr_descriptors in (dm_area); /* All done with descriptor info. */ 897 attr_desc_ptr = null; 898 end; /* Ends do for model_relations.nrels loop. */ 899 900 if creating_incl then do; /* Put out a separator bar at end of include segment. */ 901 er_mess = copy ("*", 76 - length (rtrim (dm_entry_name))); 902 call ioa_$ioa_switch (out_iocb_ptr, "^//* END of ^a^4x^a/", out_entry_name, er_mess); 903 end; 904 /* Close the output stream. */ 905 call iox_$close (out_iocb_ptr, code); 906 if code ^= 0 then do; 907 call ioa_$rsnnl ("^/Tried to close switch to ^a>^a", er_mess, 0, out_dir, out_entry_name); 908 go to ERROR; 909 end; 910 /* Detach the output switch. */ 911 call iox_$detach_iocb (out_iocb_ptr, code); 912 if code ^= 0 then do; 913 call ioa_$rsnnl ("^/Tried to detach switch to ^a>~a", er_mess, 0, out_dir, out_entry_name); 914 go to ERROR; 915 end; 916 /* Get the bit count so that tssi_ can finish its act up. */ 917 out_iocb_ptr = null (); 918 919 call hcs_$status_minf (out_dir, out_entry_name, chase, 0, out_len, code); 920 if code ^= 0 then do; 921 call ioa_$rsnnl ("^/Tried to get length of ^a>^a", er_mess, 0, out_dir, out_entry_name); 922 go to ERROR; 923 end; 924 /* Now its tssi_'s turn. */ 925 call tssi_$finish_segment (out_ptr, out_len, (RW_ACCESS), out_acl_ptr, code); 926 if code ^= 0 then do; 927 call ioa_$rsnnl ("^/Tried to finish segment, ^a>^a", er_mess, 0, out_dir, out_entry_name); 928 go to ERROR; 929 end; 930 go to CLEANUP; /* Mission accomplished. */ 931 932 ERROR: /* Report all errors here. */ 933 call com_err_ (code, prog_name, er_mess); 934 code = 1; /* so segment gets deleted */ 935 936 CLEANUP: 937 call clean_up (); 938 return; /* Done no matter what. */ 939 940 clean_up: proc; /* Clean up this operation. */ 941 942 call mrds_dm_get_attributes$set_db_view (); /* leave in known state */ 943 if attr_desc_ptr ^= null then free attr_descriptors in (dm_area); 944 if rd_ptr ^= null then free rel_desc in (dm_area); 945 if mr_order_ptr ^= null then free mr_order_ptr -> model_relations in (dm_area); 946 if mr_ptr ^= null then free model_relations in (dm_area); 947 if dmh_ptr ^= null then free dm_header in (dm_area); 948 if out_iocb_ptr ^= null then do; 949 call iox_$close (out_iocb_ptr, discard_code); 950 call iox_$detach_iocb (out_iocb_ptr, discard_code); 951 end; 952 if out_acl_ptr ^= null then call tssi_$clean_up_segment (out_acl_ptr); 953 if out_ptr ^= null & code ^= 0 then call delete_$ptr (out_ptr, "000111"b, (prog_name), code); 954 if dm_ptr ^= null then call mrds_dm_close (dm_ptr, code); 955 if submodel then call mrds_dsm_close$force (submodel_iocb_ptr); 956 if hd_ptr ^= null () then free hd_ptr -> mrds_dsm_header in (dm_area); 957 if str_ptr ^= null () then free str_ptr -> relation_block in (dm_area); 958 if new_rd_ptr ^= null () then free new_rd_ptr -> rel_desc in (dm_area); 959 960 end clean_up; 961 962 conv_error: proc; 963 964 call ioa_$rsnnl ("^/Conversion error occured in argument, ""^a"", following ^a control argument.", 965 er_mess, 0, arg, control_arg); 966 code = error_table_$bad_conversion; 967 go to ERROR; 968 969 end conv_error; 970 971 new_page: proc; 972 973 call ioa_$ioa_switch_nnl (out_iocb_ptr, "^|"); 974 lines_left = page_len; 975 976 end new_page; 977 978 output_buffer: proc (blank_line_count, buf_line_count); 979 980 dcl b fixed bin; 981 dcl blank_line_count fixed bin; 982 dcl buf_line_count fixed bin; 983 984 if page_len ^= 0 then do; 985 if lines_left < blank_line_count + buf_line_count then call new_page (); 986 lines_left = lines_left - blank_line_count - buf_line_count; 987 end; 988 989 do b = 1 to blank_line_count; 990 call ioa_$ioa_switch (out_iocb_ptr, ""); 991 end; 992 blank_line_count = 0; 993 994 do b = 1 to buf_line_count; 995 call ioa_$ioa_switch (out_iocb_ptr, "^a", buf (b)); 996 end; 997 998 end output_buffer; 999 1000 dcl arg char (arg_len) based (arg_ptr); 1001 dcl arg_len fixed bin; 1002 dcl arg_ptr pointer; 1003 dcl attr fixed bin; 1004 dcl attr_desc_ptr pointer internal static; 1005 dcl 1 attr_descriptors aligned based (attr_desc_ptr), 1006 2 nattr fixed bin, 1007 2 attr_desc (num_attr refer (attr_descriptors.nattr)) char (120) varying; 1008 dcl b fixed bin; 1009 dcl below_sw bit (1); 1010 dcl blank_lines fixed bin; 1011 dcl box_len fixed bin; 1012 dcl brief_table bit (1); 1013 dcl buf (12) char (256) varying; 1014 dcl buf_next_column fixed bin; 1015 dcl chase fixed bin (1) init (1) internal static options (constant); 1016 dcl clock_ entry returns (fixed bin (71)); 1017 dcl copy builtin; 1018 dcl current_date_time char (24); 1019 dcl addr builtin; 1020 dcl cleanup condition; 1021 dcl code fixed bin (35); 1022 dcl com_err_ entry options (variable); 1023 dcl control_arg char (32); 1024 dcl conversion condition; 1025 dcl convert builtin; 1026 dcl cu_$arg_count entry (fixed bin); 1027 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 1028 dcl date_time_ entry (fixed bin (71), char (*)); 1029 dcl dm_abs_path char (168); 1030 dcl dm_adir char (168); 1031 dcl dm_aentry_name char (32); 1032 dcl dm_area area based (dm_area_ptr); 1033 dcl dm_area_ptr pointer internal static init (null); 1034 dcl dm_dir char (168); 1035 dcl dm_entry_name char (32); 1036 dcl dm_path char (168); 1037 dcl dm_ptr pointer; 1038 dcl mrds_dm_close entry (ptr, fixed bin (35)); 1039 dcl mrds_dm_get_attributes entry (ptr, char (32), ptr, ptr, fixed bin (35)); 1040 dcl mrds_dm_get_header entry (ptr, ptr, ptr, fixed bin (35)); 1041 dcl mrds_dm_get_relations entry (ptr, ptr, ptr, fixed bin (35)); 1042 dcl mrds_dm_open entry (char (168), fixed bin, ptr, fixed bin (35)); 1043 dcl empty builtin; 1044 dcl er_mess char (256) varying; 1045 dcl error_table_$bad_arg fixed bin (35) external; 1046 dcl error_table_$bad_conversion fixed bin (35) external; 1047 dcl error_table_$badcall fixed bin (35) external; 1048 dcl error_table_$badopt fixed bin (35) external; 1049 dcl error_table_$inconsistent fixed bin (35) external; 1050 dcl error_table_$noarg fixed bin (35) external; 1051 dcl error_table_$wrong_no_of_args fixed bin (35) external; 1052 dcl suffixed_name_$new_suffix entry (char (*), char (*), char (*), char (32), fixed bin (35)); 1053 dcl expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 1054 dcl expect fixed bin; 1055 dcl get_system_free_area_ entry returns (ptr); 1056 dcl have_of bit (1); 1057 dcl have_relation bit (1); 1058 dcl hcs_$get_link_target entry (char (*), char (*), char (*), char (*), fixed bin (35)); 1059 dcl hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), fixed bin (35)); 1060 dcl i fixed bin; 1061 dcl iarg fixed bin; 1062 dcl creating_incl bit (1); 1063 dcl based_decls bit (1); /* on => create based declaration */ 1064 dcl secured_view bit (1); /* on => non-dba on secured db */ 1065 dcl index builtin; 1066 dcl ioa_ entry options (variable); 1067 dcl ioa_$ioa_switch entry options (variable); 1068 dcl ioa_$ioa_switch_nnl entry options (variable); 1069 dcl ioa_$rsnnl entry options (variable); 1070 dcl iox_$attach_name entry (char (*), ptr, char (*), ptr, fixed bin (35)); 1071 dcl iox_$close entry (ptr, fixed bin (35)); 1072 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 1073 dcl iox_$open entry (ptr, fixed bin, bit (1) aligned, fixed bin (35)); 1074 dcl j fixed bin; 1075 dcl legend_len fixed bin; 1076 dcl length builtin; 1077 dcl line_len fixed bin; 1078 dcl lines_left fixed bin; 1079 dcl ll_arg fixed bin init (1) internal static options (constant); 1080 dcl max builtin; 1081 dcl max_buf_len fixed bin; 1082 dcl max_rel_name_len fixed bin; 1083 dcl mr_order_ptr pointer; 1084 dcl mu_display_descriptor entry (ptr) returns (char (120) varying); 1085 dcl nargs fixed bin; 1086 dcl no bit (1) init ("0"b) internal static options (constant); 1087 dcl norder fixed bin; 1088 dcl nrelations fixed bin; 1089 dcl null builtin; 1090 dcl order_arg fixed bin init (3) internal static options (constant); 1091 dcl order_begin fixed bin; 1092 dcl order_end fixed bin; 1093 dcl ordering bit (1); 1094 dcl output_file_arg fixed bin init (5) internal static options (constant); 1095 dcl out_acl_ptr pointer internal static; 1096 dcl out_atd char (175) varying; 1097 dcl out_dir char (168); 1098 dcl out_entry_name char (32); 1099 dcl out_iocb_ptr pointer init (null ()); 1100 dcl out_len fixed bin (24); 1101 dcl out_ptr pointer; 1102 dcl path_argument char (168); /* holds the input argumenbt corresponding to the db/dsm path */ 1103 dcl page_len fixed bin; 1104 dcl pl_arg fixed bin init (2) internal static options (constant); 1105 dcl prog_name char (32) varying; 1106 dcl rel_name_arg fixed bin init (4) internal static options (constant); 1107 dcl retrieval fixed bin init (2) internal static options (constant); 1108 dcl right_margin fixed bin; 1109 dcl rltn fixed bin; 1110 dcl row fixed bin; 1111 dcl rtrim builtin; 1112 dcl stream_out fixed bin init (2) internal static options (constant); 1113 dcl substr builtin; 1114 dcl suffix char (32); 1115 dcl tssi_$clean_up_segment entry (ptr); 1116 dcl tssi_$finish_segment entry (ptr, fixed bin (24), bit (36) aligned, ptr, fixed bin (35)); 1117 dcl tssi_$get_segment entry (char (*), char (*), ptr, ptr, fixed bin (35)); 1118 dcl time_str char (24); 1119 dcl translate builtin; 1120 dcl unique_chars_ entry (bit (*)) returns (char (15)); 1121 dcl unspec builtin; 1122 dcl version char (4) varying init ("3.0") internal static options (constant); 1123 dcl mu_trim_descriptor entry (char (120) varying) returns (char (*)); /* shortens descriptor string 1124* using defaults/abbrevs */ 1125 dcl (mrds_dm_get_attributes$set_user_view, mrds_dm_get_attributes$set_db_view) entry (); 1126 dcl db_version fixed bin; /* db_version 1 - 4 of database */ 1127 dcl mrds_dsl_get_version$get_path_info entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); /* gets path details */ 1128 dcl local_area area (2048); /* space for path info */ 1129 dcl hd_ptr ptr; /* points to submodel header */ 1130 dcl str_ptr ptr; /* points to submodel relation info */ 1131 dcl submodel bit (1); /* on => submodel pathname given */ 1132 dcl mrds_dsm_close$force entry (ptr); 1133 dcl discard_code fixed bin (35); /* unused error code */ 1134 dcl mrds_dsm_open$read entry (char (*), ptr, fixed bin (35)); 1135 dcl mrds_dsm_read_header entry (ptr, ptr, ptr, fixed bin (35)); 1136 dcl mrds_dsm_get_relation_names entry (ptr, ptr, ptr, fixed bin (35)); 1137 dcl mrds_dsm_read_relation entry (char (*), ptr, ptr, ptr, fixed bin (35)); 1138 dcl submodel_iocb_ptr ptr init (null ());/* pointer to the submodels iocb */ 1139 dcl found bit (1); /* on => found model attr in submodel list */ 1140 dcl sm_attr_num fixed bin; /* index into submodel attr list */ 1141 dcl model_path char (168); /* name of data model to open */ 1142 dcl entry_suffix char (4) varying; /* either .dsm or .db */ 1143 dcl attr_num fixed bin; /* index into model attr list */ 1144 dcl ON bit (1) internal static options (constant) init ("1"b); /* true value */ 1145 dcl OFF bit (1) internal static options (constant) init ("0"b); /* false value */ 1146 dcl model_type char (4); /* either Data or Sub model */ 1147 dcl new_rd_ptr ptr; /* to temp copy of rel_desc */ 1148 dcl model_name char (32); /* name of data model relation */ 1149 dcl delete_$ptr entry (ptr, bit (6), char (*), fixed bin (35)); /* deletes segment from pointer */ 1150 dcl options char (80) varying; /* allowed control arguments */ 1151 dcl sm_abs_path char (168) varying;/* absolute path of submodel with suffix */ 1152 dcl mrds_dm_db_secured$get_secured_status entry (ptr, ptr, fixed bin, ptr, fixed bin (35)); /* gets security bit */ 1153 dcl secure_submodel bit (1); /* on => submodel resides in submodel dir */ 1154 dcl mrds_error_$inc_secure_open fixed bin (35) ext; /* using db path or un-secure submodel when secured */ 1155 dcl mrds_error_$no_database fixed bin (35) ext static; 1156 dcl mrds_error_$no_model_submodel fixed bin (35) ext static; 1157 1158 dcl mrds_data_$submodel_dir_name char (16) ext; /* name of sm dir */ 1159 dcl mrds_dm_secured_submodel entry (char (*), char (*), char (*)) returns (bit (1)); /* returns( true if submodel in sm dir */ 1160 dcl mrds_dm_authorization$get_user_class entry (char (*), ptr, fixed bin, ptr, fixed bin (35)); /* finds if user a dba */ 1161 dcl get_wdir_ entry () returns (char (168)); 1162 1 1 /* BEGIN INCLUDE FILE mrds_authorization.incl.pl1 - - 81-01-20 Jim Gray */ 1 2 1 3 /* HISTORY: 1 4* 1 5* 81-01-20 Jim Gray : original created for the mmi_$get_authorization interface 1 6* 1 7**/ 1 8 1 9 /* DESCRIPTION: 1 10* 1 11* this structure returns the callers user_class 1 12* either database administrator or normal user. 1 13* Note that these separate classes were used to allow 1 14* future expansion to the user classes, rather than 1 15* make them logical "not"'s of one another. 1 16* NOTE: a DBA is always also a normal user, thus if the caller 1 17* is a DBA, his normal_user bit will be on also. 1 18* 1 19**/ 1 20 1 21 1 22 declare 1 mrds_authorization aligned based (mrds_authorization_ptr), 1 23 2 version fixed bin, /* version number of this structure */ 1 24 2 administrator bit (1) unal, /* caller is a DBA */ 1 25 2 normal_user bit (1) unal, /* caller has no special priviledges */ 1 26 2 mbz bit (34) unal ; 1 27 1 28 1 29 declare mrds_authorization_ptr ptr ; /* pointer for referring to the structure */ 1 30 1 31 declare mrds_authorization_structure_version fixed bin init (1) int static options (constant) ; 1 32 1 33 /* END INCLUDE FILE mrds_authorization.incl.pl1 */ 1163 1164 2 1 /* BEGIN INCLUDE FILE mrds_database_state.incl.pl1 - - 81-01-20 Jim Gray */ 2 2 2 3 /* HISTORY: 2 4* 2 5* 81-01-20 Jim Gray : original created for the mmi_$get_secured_status interface 2 6* 2 7**/ 2 8 2 9 /* DESCRIPTION: 2 10* 2 11* This structure returns the database state (secured or unsecured) 2 12* for determining how commands and subroutines will behave for each case. 2 13* The secured bit was kept separate from the unsecured, 2 14* rather than it's logical "not", to allow for future extensibility 2 15* of database secured states. 2 16* 2 17**/ 2 18 2 19 2 20 declare 1 database_state aligned based (database_state_ptr), 2 21 2 version fixed bin, /* version number of this structure */ 2 22 2 unsecured bit (1) unal, /* database not secured */ 2 23 2 secured bit (1) unal, /* database has been secured */ 2 24 2 mbz bit (34) unal ; 2 25 2 26 2 27 declare database_state_ptr ptr ; /* pointer for referring to the structure */ 2 28 2 29 declare database_state_structure_version fixed bin init (1) int static options (constant) ; 2 30 2 31 /* END INCLUDE FILE mrds_database_state.incl.pl1 */ 1165 1166 3 1 /* BEGIN INCLUDE FILE mrds_dsm_header.incl.pl1 3 2* 3 3*This include file is for internal MRDS use only - it is not to be 3 4*documented in any user manual. 3 5* 3 6*81-06-01 Davids: This is a copy of the mrds_dsm_header_str 3 7*include file, it is to be used by all mrds routines. The 3 8*structure name has been changed from dsm_header_record to 3 9*mrds_dsm_header to avoid conflicts when both this include file 3 10*and mrds_dsm_header_str are included (mrds_dsm_dsmd). 3 11**/ 3 12 3 13 dcl 1 mrds_dsm_header based, /* header structure for a MRDS submodel */ 3 14 2 dsm_generator_version fixed bin init (0), /* version number of submodel created by CMDSM */ 3 15 2 date_time_generated fixed bin (71) init (0), /* convert data to binary form of creation time */ 3 16 2 database_pn char (168) init (""), /* pathname of database this submodel is valid for */ 3 17 2 name char (32) init (""), /* identifying name for this header structure */ 3 18 2 num_of_relations fixed bin (35) init (0), /* number of relations in submodel view of database */ 3 19 2 creator_id char (32) init ("") ; /* the person.project.tag of the submodel creator */ 3 20 3 21 /* END INCLUDE FILE mrds_dsm_header.incl.pl1 */ 1167 1168 4 1 /* BEGIN INCLUDE FILE mrds_dsm_rel_block.incl.pl1 4 2* 4 3* Created October, 1975 for release in MR 4.0 4 4* 4 5* The relation_block contains the relation name and the attribute 4 6* names and access information 4 7* 4 8* HISTORY 4 9* 4 10* 80-04-10 Spratt: changed to have version number, be explicitly 4 11* . based, use an automatic variable in the refer for num of 4 12* . attributes, add access flags for rel and attr's, remove 4 13* . attr key flags. This is for the first Attribute Level 4 14* . Security version of MRDS. 4 15* 4 16* 81-01-14 Davids: increased submodel rel and attr names to 64 4 17* . characters and made dsm_rel_name char varying. changed 4 18* . access bits from a bit string to individually named 4 19* . flags. 4 20**/ 4 21 4 22 dcl relation_block_ptr ptr; 4 23 dcl rb_number_of_attributes fixed bin (35); 4 24 dcl RELATION_BLOCK_VERSION_1 fixed bin (35) internal static options (constant) init (1); 4 25 4 26 dcl 1 relation_block based (relation_block_ptr), 4 27 /* Relation block */ 4 28 2 version fixed bin (35), 4 29 2 dsm_rel_name char (64) varying, /* Data submodel relation name */ 4 30 2 dm_rel_name char (32), /* Data model relation name */ 4 31 2 rel_access unal, 4 32 3 append bit (1), 4 33 3 delete bit (1), 4 34 3 null bit (1), 4 35 3 mbz1 bit (33), 4 36 2 no_rb_attributes fixed bin, /* The number of attributes in this relation */ 4 37 2 attribute_info (rb_number_of_attributes refer (relation_block.no_rb_attributes)), 4 38 3 dsm_attr_name char (64) varying, /* Data submodel attribute name */ 4 39 3 attr_access unal, /* Data submodel attribute flags */ 4 40 4 read bit (1), 4 41 4 modify bit (1), 4 42 4 null bit (1), 4 43 4 mbz2 bit (33), /* For future use */ 4 44 3 dm_attr_name char (32) varying, /* Data model attribute name */ 4 45 3 dm_attr_flags, /* Data model attribute flags */ 4 46 4 mbz3 bit (36); /* For future use */ 4 47 4 48 /* END INCLUDE FILE mrds_dsm_rel_block.incl.pl1 */ 4 49 1169 1170 5 1 /* BEGIN INCLUDE FILE mrds_dsm_relation_names.incl.pl1 -- nsd 81/01/12 */ 5 2 5 3 /* 5 4*This include file is for internal mrds use only. It is used to 5 5*return an array of submodel relation names. 5 6* 5 7*HISTORY 5 8* 5 9*81-01-12 Davids: written 5 10* 5 11*81-09-14 Davids: changed relation to char (32) from char (64). 64 5 12*was a proposed maximum but could not be implemented. Several 5 13*modules would not compile when compiled with -prefix stringsize 5 14*becuase they made assignments of the form char (32) = char (64). 5 15**/ 5 16 5 17 dcl 1 mrds_dsm_relation_names based (mrds_dsm_relation_names_ptr), 5 18 2 nrels fixed bin, 5 19 2 relation (mrds_dsm_relation_names_nrels_alloc refer (mrds_dsm_relation_names.nrels)) char (32); 5 20 5 21 dcl mrds_dsm_relation_names_nrels_alloc fixed bin; 5 22 5 23 dcl mrds_dsm_relation_names_ptr ptr; 5 24 5 25 /* END INCLUDE FILE mrds_dsm_relation_names.incl.pl1 */ 5 26 1171 1172 6 1 /* BEGIN INCLUDE FILE mrds_dm_header.incl.pl1 6 2* 6 3* Created October, 1975 for release in MR 4.0 6 4* Modified December, 1975 to provide more info. */ 6 5 6 6 dcl 1 dm_header based (dmh_ptr), /* data model header */ 6 7 2 dm_header_id char (8), /* identification as data model header */ 6 8 2 dmd_version fixed bin, /* version number of dmd_ creating this model */ 6 9 2 creator_id char (32), /* group id of creator */ 6 10 2 create_time fixed bin (71); /* time of creation */ 6 11 6 12 dcl dmh_ptr ptr; 6 13 6 14 /* END INCLUDE FILE mrds_dm_header.incl.pl1 */ 6 15 1173 1174 7 1 /* BEGIN INCLUDE FILE mrds_rel_desc.incl.pl1 rgl, 03/31/76 */ 7 2 7 3 /* 76-09-20 R. Lackey : modified to handle inverted attributes 7 4* 7 5* 76-11-16 J. A. Weeldreyer : modified to add domain name 7 6* 7 7* 82-08-19 D. Woodka : deleted rel_desc.attributes.bit_offset field 7 8* for the DMS conversion 7 9* 7 10**/ 7 11 7 12 dcl 1 rel_desc based (rd_ptr), /* record description of relation records */ 7 13 2 num_attr fixed bin, /* number of attributes in the model */ 7 14 2 key_length fixed bin (35), /* length in bits of data portion of tuple */ 7 15 2 data_length fixed bin (35), /* length in bits of data portion of tuple */ 7 16 2 num_keys fixed bin, /* number of key attributes */ 7 17 2 inversion bit (1) unal, /* On if this relation contains any inverted attributes */ 7 18 2 reserved bit (35) unal, /* Reserved for future use */ 7 19 2 attributes (num_attr_alloc refer (rel_desc.num_attr)), 7 20 3 attribute_name char (32), /* name of attribute */ 7 21 3 domain_name char (32), /* name of underlying domain */ 7 22 3 bit_length bit (18) unaligned, /* length of data item in bits */ 7 23 3 key_flag bit (1) unaligned, /* indicates whether attribute is part of primary key */ 7 24 3 inver_flag bit (1) unaligned, /* On if this attribute is inverted */ 7 25 3 unused bit (34) unaligned, /* reserved for expansion */ 7 26 3 key_attr_order fixed bin, /* order num of this key attr */ 7 27 3 descriptor bit (36); /* Multics descriptor for attribute */ 7 28 7 29 dcl num_attr_alloc fixed bin (10); /* Number of attributes in relation for allocation purposes */ 7 30 7 31 dcl rd_ptr ptr; 7 32 7 33 /* END INCLUDE FILE mrds_rel_desc.incl.pl1 */ 7 34 1175 1176 8 1 /* BEGIN INCLUDE FILE mrds_model_relations.incl.pl1 8 2* 8 3* Created October, 1975 for release in MR 4.0 */ 8 4 8 5 dcl 1 model_relations based (mr_ptr), /* structure to return names of all relations in a model */ 8 6 2 nrels fixed bin (10), /* number of relations */ 8 7 2 relation_name (num_relations_alloc refer (model_relations.nrels)) char (32); /* relation names */ 8 8 8 9 dcl num_relations_alloc fixed bin (10); /* number of relations in model for allocation purposes */ 8 10 8 11 dcl mr_ptr ptr; 8 12 8 13 /* END INCLUDE FILE mrds_model_relations.incl.pl1 */ 8 14 1177 1178 9 1 /* BEGIN INCLUDE FILE mrds_path_info.incl.pl1 - - Jim Gray 81-01-22 */ 9 2 9 3 /* HISTORY: 9 4* 9 5* 81-01-22 Jim Gray : originaly created for the dsl_$get_path_info interface, 9 6* a slight extension to the undocumented mrds_dsl_get_version$header. 9 7* 9 8**/ 9 9 9 10 /* DESCRIPTION: 9 11* 9 12* This structure returns information about a relative pathname, given 9 13* to a pathname accepting mrds interface. The information returned 9 14* is the absolute pathname, plus in the case that 9 15* the relative path points to a mrds database or submodel 9 16* whether it is a model or a submodel, the mrds version of 9 17* the model or submodel, it's creator, and the time of creation. 9 18* 9 19**/ 9 20 9 21 9 22 declare 1 mrds_path_info aligned based (mrds_path_info_ptr), 9 23 2 version fixed bin, /* version number for this structure */ 9 24 2 absolute_path char (168), /* the absolute path from the input relative path */ 9 25 2 type, 9 26 3 not_mrds bit (1) unal, /* on => path not to model or submodel */ 9 27 3 model bit (1) unal, /* on => path to database model, thus possible .db suffix */ 9 28 3 submodel bit (1) unal, /* on => path to submodel, thus possible .dsm suffix */ 9 29 3 mbz1 bit (33) unal, 9 30 2 mrds_version fixed bin, /* the mrds version number of the model or submodel */ 9 31 2 creator_id char (32), /* the person.project.tag of the creator */ 9 32 2 creation_time fixed bin (71), /* convert date to binary form of time model/submodel created */ 9 33 2 mbz2 bit (36) unal ; 9 34 9 35 9 36 declare mrds_path_info_ptr ptr ; 9 37 9 38 declare mrds_path_info_structure_version fixed bin init (1) int static options (constant) ; 9 39 9 40 /* END INCLUDE FILE mrds_path_info.incl.pl1 */ 1179 1180 10 1 /* BEGIN INCLUDE FILE ... access_mode_values.incl.pl1 10 2* 10 3* Values for the "access mode" argument so often used in hardcore 10 4* James R. Davis 26 Jan 81 MCR 4844 10 5* Added constants for SM access 4/28/82 Jay Pattin 10 6* Added text strings 03/19/85 Chris Jones 10 7**/ 10 8 10 9 10 10 /* format: style4,delnl,insnl,indattr,ifthen,dclind10 */ 10 11 dcl ( 10 12 N_ACCESS init ("000"b), 10 13 R_ACCESS init ("100"b), 10 14 E_ACCESS init ("010"b), 10 15 W_ACCESS init ("001"b), 10 16 RE_ACCESS init ("110"b), 10 17 REW_ACCESS init ("111"b), 10 18 RW_ACCESS init ("101"b), 10 19 S_ACCESS init ("100"b), 10 20 M_ACCESS init ("010"b), 10 21 A_ACCESS init ("001"b), 10 22 SA_ACCESS init ("101"b), 10 23 SM_ACCESS init ("110"b), 10 24 SMA_ACCESS init ("111"b) 10 25 ) bit (3) internal static options (constant); 10 26 10 27 /* The following arrays are meant to be accessed by doing either 1) bin (bit_value) or 10 28* 2) divide (bin_value, 2) to come up with an index into the array. */ 10 29 10 30 dcl SEG_ACCESS_MODE_NAMES (0:7) init ("null", "W", "E", "EW", "R", "RW", "RE", "REW") char (4) internal 10 31 static options (constant); 10 32 10 33 dcl DIR_ACCESS_MODE_NAMES (0:7) init ("null", "A", "M", "MA", "S", "SA", "SM", "SMA") char (4) internal 10 34 static options (constant); 10 35 10 36 dcl ( 10 37 N_ACCESS_BIN init (00000b), 10 38 R_ACCESS_BIN init (01000b), 10 39 E_ACCESS_BIN init (00100b), 10 40 W_ACCESS_BIN init (00010b), 10 41 RW_ACCESS_BIN init (01010b), 10 42 RE_ACCESS_BIN init (01100b), 10 43 REW_ACCESS_BIN init (01110b), 10 44 S_ACCESS_BIN init (01000b), 10 45 M_ACCESS_BIN init (00010b), 10 46 A_ACCESS_BIN init (00001b), 10 47 SA_ACCESS_BIN init (01001b), 10 48 SM_ACCESS_BIN init (01010b), 10 49 SMA_ACCESS_BIN init (01011b) 10 50 ) fixed bin (5) internal static options (constant); 10 51 10 52 /* END INCLUDE FILE ... access_mode_values.incl.pl1 */ 1181 1182 1183 end cmdmi; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 03/25/87 0948.9 create_mrds_dm_include.pl1 >spec>install>1012>create_mrds_dm_include.pl1 1163 1 10/14/83 1608.8 mrds_authorization.incl.pl1 >ldd>include>mrds_authorization.incl.pl1 1165 2 10/14/83 1608.8 mrds_database_state.incl.pl1 >ldd>include>mrds_database_state.incl.pl1 1167 3 10/14/83 1608.9 mrds_dsm_header.incl.pl1 >ldd>include>mrds_dsm_header.incl.pl1 1169 4 10/14/83 1608.7 mrds_dsm_rel_block.incl.pl1 >ldd>include>mrds_dsm_rel_block.incl.pl1 1171 5 10/14/83 1609.0 mrds_dsm_relation_names.incl.pl1 >ldd>include>mrds_dsm_relation_names.incl.pl1 1173 6 10/14/83 1608.6 mrds_dm_header.incl.pl1 >ldd>include>mrds_dm_header.incl.pl1 1175 7 10/14/83 1609.0 mrds_rel_desc.incl.pl1 >ldd>include>mrds_rel_desc.incl.pl1 1177 8 10/14/83 1608.4 mrds_model_relations.incl.pl1 >ldd>include>mrds_model_relations.incl.pl1 1179 9 10/14/83 1608.8 mrds_path_info.incl.pl1 >ldd>include>mrds_path_info.incl.pl1 1181 10 04/11/85 1452.6 access_mode_values.incl.pl1 >ldd>include>access_mode_values.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. OFF constant bit(1) initial unaligned dcl 1145 ref 153 169 448 478 723 820 ON constant bit(1) initial unaligned dcl 1144 ref 141 209 226 245 249 274 308 477 480 575 729 738 822 RW_ACCESS constant bit(3) initial unaligned dcl 10-11 ref 925 absolute_path 1 based char(168) level 2 dcl 9-22 ref 197 addr builtin function dcl 1019 ref 191 191 451 451 464 464 762 762 administrator 1 based bit(1) level 2 packed unaligned dcl 1-22 ref 472 arg based char unaligned dcl 1000 set ref 190 191 194 221 221 223 223 225 225 225 225 226 226 228* 231 232 236* 241 242 243 248 248 249 257 258* 263* 267 273 280 294 310 642 964* arg_len 000100 automatic fixed bin(17,0) dcl 1001 set ref 186* 190 191 194 216* 221 221 223 223 225 225 225 225 226 226 228 228 231 232 236 236 241 242 243 248 248 249 257 258 258 263 263 267 273 280 294 310 640* 642 964 964 arg_ptr 000102 automatic pointer dcl 1002 set ref 186* 190 191 194 216* 221 221 223 223 225 225 225 225 226 226 228 231 232 236 241 242 243 248 248 249 257 258 263 267 273 280 294 310 640* 642 964 attr 000104 automatic fixed bin(17,0) dcl 1003 set ref 759* 762 762 762 764 766 766 766 772 774 774 775* 810* 818 820 822 822 830 830 830 830 830 830 830 830 830 830 830 830 830 830 839 840 866 866 869 873* attr_desc 1 based varying char(120) array level 2 dcl 1005 set ref 762* 764 766* 766 766 774* 774* 775 830* 830 830 840 873* attr_desc_ptr 000010 internal static pointer dcl 1004 set ref 150* 757* 762 764 766 766 766 774 774 775 830 830 830 840 873 896 897* 943 943 attr_descriptors based structure level 1 dcl 1005 set ref 757 896 943 attr_num 006550 automatic fixed bin(17,0) dcl 1143 set ref 724* 727 730 735 735* 735 attribute_info 34 based structure array level 2 unaligned dcl 4-26 attribute_name 5 based char(32) array level 3 packed unaligned dcl 7-12 set ref 727 732* 772 830 830 830 830 839 869* attributes 5 based structure array level 2 unaligned dcl 7-12 set ref 730* 730 b 006740 automatic fixed bin(17,0) dcl 980 in procedure "output_buffer" set ref 989* 994* 995* b 000105 automatic fixed bin(17,0) dcl 1008 in procedure "cmdmi" set ref 857* 858* based_decls 002165 automatic bit(1) unaligned dcl 1063 set ref 153* 249* 794* below_sw 000106 automatic bit(1) unaligned dcl 1009 set ref 571* 575* 592 blank_line_count parameter fixed bin(17,0) dcl 981 set ref 978 985 986 989 992* blank_lines 000107 automatic fixed bin(17,0) dcl 1010 set ref 792* 796* 854* 887* box_len 000110 automatic fixed bin(17,0) dcl 1011 set ref 772* 775* 775 778 783 839* 840* 840 844 864 866* 869* 873* 877 878 brief_table 000111 automatic bit(1) unaligned dcl 1012 set ref 154* 226* 584 773 791 791 840 849 872 883 buf 000112 automatic varying char(256) array dcl 1013 set ref 509* 515* 516* 517* 521* 523* 524* 525* 526* 529 531 535* 535 535 539* 541* 542* 545 545* 545* 576* 579* 579 580* 580 581* 581 582* 582 585* 585 588* 588 589* 589 590* 590 591* 591 794* 800* 801* 801* 802* 804* 830* 846* 846 847* 847 851* 851 856* 858* 860* 864* 864 867* 867 870* 870 874* 874 877* 877 885* 885 995* buf_line_count parameter fixed bin(17,0) dcl 982 ref 978 985 986 994 buf_next_column 001526 automatic fixed bin(17,0) dcl 1014 set ref 706* 778 780* 783* 783 799* 844 861* 878* 878 chase 000127 constant fixed bin(1,0) initial dcl 1015 set ref 919* cleanup 001536 stack reference condition dcl 1020 ref 427 clock_ 000016 constant entry external dcl 1016 ref 442 code 001544 automatic fixed bin(35,0) dcl 1021 set ref 176* 191* 200 201 201* 253* 259* 264* 285* 300* 328* 335* 344* 345 352* 353 370* 371 380* 381 392* 393 399* 400 421* 422 432* 433 451* 453 464* 466 494* 548* 556* 557 561* 562 600* 601 610* 611 628* 653* 684* 685 698* 700 905* 906 911* 912 919* 920 925* 926 932* 934* 953 953* 954* 966* com_err_ 000020 constant entry external dcl 1022 ref 932 control_arg 001545 automatic char(32) unaligned dcl 1023 set ref 267* 330* 340* 964* conversion 001556 stack reference condition dcl 1024 ref 279 281 293 295 convert builtin function dcl 1025 ref 280 294 copy builtin function dcl 1017 ref 535 538 580 580 580 581 581 585 588 588 589 590 591 800 801 804 856 858 860 864 877 901 create_time 14 based fixed bin(71,0) level 2 dcl 6-6 set ref 413* 440* creating_incl 002164 automatic bit(1) unaligned dcl 1062 set ref 141* 147* 177 228 234 251 282 282 361 569 763 788 793 829 881 900 creator_id 3 based char(32) level 2 in structure "dm_header" packed unaligned dcl 6-6 in procedure "cmdmi" set ref 412* 526* creator_id 67 based char(32) initial level 2 in structure "mrds_dsm_header" packed unaligned dcl 3-13 in procedure "cmdmi" ref 412 cu_$arg_count 000022 constant entry external dcl 1026 ref 174 cu_$arg_ptr 000024 constant entry external dcl 1027 ref 186 216 640 current_date_time 001527 automatic char(24) unaligned dcl 1018 set ref 442* 516* database_pn 4 based char(168) initial level 2 packed unaligned dcl 3-13 ref 417 database_state based structure level 1 dcl 2-20 database_state_ptr 006670 automatic pointer dcl 2-27 set ref 451* 459 database_state_structure_version 000127 constant fixed bin(17,0) initial dcl 2-29 set ref 451* date_time_ 000026 constant entry external dcl 1028 ref 440 442 date_time_generated 2 based fixed bin(71,0) initial level 2 dcl 3-13 ref 413 db_version 002461 automatic fixed bin(17,0) dcl 1126 set ref 198* delete_$ptr 000146 constant entry external dcl 1149 ref 953 descriptor 30 based bit(36) array level 3 packed unaligned dcl 7-12 set ref 762 762 discard_code 006467 automatic fixed bin(35,0) dcl 1133 set ref 949* 950* dm_abs_path 001564 automatic char(168) unaligned dcl 1029 set ref 359* 391 401* 419 dm_adir 001636 automatic char(168) unaligned dcl 1030 set ref 352* 359 480 480 dm_aentry_name 001710 automatic char(32) unaligned dcl 1031 set ref 352* 359 480 480 dm_area based area(1024) dcl 1032 ref 408 617 621 634 668 714 749 757 891 894 896 943 944 945 946 947 956 957 958 dm_area_ptr 000012 internal static pointer initial dcl 1033 set ref 388* 399* 408 432* 600* 610* 617 621 634 668 684* 698* 714 749 757 891 894 896 943 944 945 946 947 956 957 958 dm_attr_name 56 based varying char(32) array level 3 dcl 4-26 ref 727 dm_dir 001720 automatic char(168) unaligned dcl 1034 set ref 344* 352* 354* dm_entry_name 001772 automatic char(32) unaligned dcl 1035 set ref 344* 352* 354* 372* 382* 901 dm_header based structure level 1 unaligned dcl 6-6 set ref 408 947 dm_header_id based char(8) level 2 packed unaligned dcl 6-6 set ref 410* dm_path 002002 automatic char(168) unaligned dcl 1036 set ref 155* 194* 197* 204* 344* 346* 392* 394* dm_ptr 002054 automatic pointer dcl 1037 set ref 156* 421* 422 432* 451* 600* 698* 954 954* dm_rel_name 22 based char(32) level 2 packed unaligned dcl 4-26 ref 693 dmd_version 2 based fixed bin(17,0) level 2 dcl 6-6 set ref 411* 449 525* dmh_ptr 006674 automatic pointer dcl 6-12 set ref 157* 408* 410 411 412 413 432* 433 440 449 525 526 947 947 dsm_attr_name 34 based varying char(64) array level 3 dcl 4-26 set ref 732 739* dsm_generator_version based fixed bin(17,0) initial level 2 dcl 3-13 ref 411 empty builtin function dcl 1043 ref 1128 entry_suffix 006546 automatic varying char(4) dcl 1142 set ref 363* 365* 380 er_mess 002056 automatic varying char(256) dcl 1044 set ref 180* 204* 252* 258* 263* 283* 297* 330* 336* 346* 354* 372* 382* 394* 401* 423* 434* 454* 467* 485* 491* 538* 539* 542* 550* 558* 563* 602* 612* 629* 651* 686* 701* 739* 866* 867 869* 870 873* 874 901* 902* 907* 913* 921* 927* 932* 964* error_table_$bad_arg 000042 external static fixed bin(35,0) dcl 1045 ref 285 300 653 error_table_$bad_conversion 000044 external static fixed bin(35,0) dcl 1046 ref 966 error_table_$badcall 000046 external static fixed bin(35,0) dcl 1047 ref 628 error_table_$badopt 000050 external static fixed bin(35,0) dcl 1048 ref 253 259 264 error_table_$inconsistent 000052 external static fixed bin(35,0) dcl 1049 ref 335 error_table_$noarg 000054 external static fixed bin(35,0) dcl 1050 ref 328 error_table_$wrong_no_of_args 000056 external static fixed bin(35,0) dcl 1051 ref 176 expand_pathname_ 000062 constant entry external dcl 1053 ref 344 370 expect 002157 automatic fixed bin(17,0) dcl 1054 set ref 158* 217 221* 223* 239* 241* 242* 244* 272 275* 277 288* 291 303* 306 306 308 314* 320* 326 found 006472 automatic bit(1) unaligned dcl 1139 set ref 723* 725 729* 738* get_system_free_area_ 000064 constant entry external dcl 1055 ref 388 get_wdir_ 000166 constant entry external dcl 1161 ref 378 have_of 002160 automatic bit(1) unaligned dcl 1056 set ref 160* 274* 369 have_relation 002161 automatic bit(1) unaligned dcl 1057 set ref 161* 308* 333 624 635 hcs_$get_link_target 000066 constant entry external dcl 1058 ref 352 hcs_$status_minf 000070 constant entry external dcl 1059 ref 919 hd_ptr 006462 automatic pointer dcl 1129 set ref 171* 399* 400 411 412 413 417 956 956 i 002162 automatic fixed bin(17,0) dcl 1060 set ref 530* 531* 534* 535 535 535* 583* 586* 588 588 589 589 590 590 591 591 592 618* 619 619* 638* 641* 641 642 644* 646 651* 661* 662 664* 677* 678* 764* 765 766 766 848* 850* 854 882* 884* 887 iarg 002163 automatic fixed bin(17,0) dcl 1061 set ref 215* 216* 237* 237 309 313 318 319* 639* 640* index builtin function dcl 1065 ref 764 inver_flag 25(19) based bit(1) array level 3 packed unaligned dcl 7-12 set ref 822* 830 830 830* 866* ioa_ 000072 constant entry external dcl 1066 ref 228 236 ioa_$ioa_switch 000074 constant entry external dcl 1067 ref 902 990 995 ioa_$ioa_switch_nnl 000076 constant entry external dcl 1068 ref 973 ioa_$rsnnl 000100 constant entry external dcl 1069 ref 180 204 252 258 263 283 297 330 336 346 354 372 382 394 401 423 434 454 467 485 491 515 516 517 521 523 524 525 526 539 541 542 550 558 563 602 612 629 651 686 701 739 794 802 830 866 869 873 907 913 921 927 964 iox_$attach_name 000102 constant entry external dcl 1070 ref 556 iox_$close 000104 constant entry external dcl 1071 ref 905 949 iox_$detach_iocb 000106 constant entry external dcl 1072 ref 911 950 iox_$open 000110 constant entry external dcl 1073 ref 561 j 002167 automatic fixed bin(17,0) dcl 1074 set ref 645* 646 647* 660* 663* 663 664 777 843 key_attr_order 27 based fixed bin(17,0) array level 3 dcl 7-12 set ref 822 key_flag 25(18) based bit(1) array level 3 packed unaligned dcl 7-12 set ref 818 820* 830 830* 830 866* legend_len 002170 automatic fixed bin(17,0) dcl 1075 set ref 159* 572 length builtin function dcl 1076 ref 529 531 535 676 678 772 775 802 830 830 830 830 839 840 901 line_len 002171 automatic fixed bin(17,0) dcl 1077 set ref 142* 148* 280* 280 282 282 282 283* 572 778 844 lines_left 002172 automatic fixed bin(17,0) dcl 1078 set ref 508* 788 791 791 974* 985 986* 986 ll_arg constant fixed bin(17,0) initial dcl 1079 ref 239 277 local_area 002462 automatic area(2048) dcl 1128 set ref 191 191 451 451 464 464 1128* max builtin function dcl 1080 ref 531 678 775 830 830 840 max_buf_len 002173 automatic fixed bin(17,0) dcl 1081 set ref 529* 531* 531 535 538 541 572 max_rel_name_len 002174 automatic fixed bin(17,0) dcl 1082 set ref 676* 678* 678 706 780 799 800 801 802 804 856 858 860 861 model_name 006554 automatic char(32) unaligned dcl 1148 set ref 693* 695* 698* model_path 006474 automatic char(168) unaligned dcl 1141 set ref 417* 419* 421 423* 434* 454* 464* 467* 480 480 485* 491* 523* 602* 612* 651* 686* 701* 739* model_relations based structure level 1 unaligned dcl 8-5 set ref 617 634 668 945 946 model_type 006551 automatic char(4) unaligned dcl 1146 set ref 511* 513* 521* 523* 629* mr_order_ptr 002176 automatic pointer dcl 1083 set ref 162* 634* 635 642 646 651 664 669 670* 945 945 mr_ptr 006704 automatic pointer dcl 8-11 set ref 163* 600* 601 617* 619 625 627 629 645 646 647 661 662 664 668 669* 676 677 678 680 680 684 695 794 794 802 802 802 946 946 mrds_authorization based structure level 1 dcl 1-22 mrds_authorization_ptr 006666 automatic pointer dcl 1-29 set ref 464* 472 mrds_authorization_structure_version 000127 constant fixed bin(17,0) initial dcl 1-31 set ref 464* mrds_data_$submodel_dir_name 000160 external static char(16) unaligned dcl 1158 set ref 485* mrds_dm_authorization$get_user_class 000164 constant entry external dcl 1160 ref 464 mrds_dm_close 000030 constant entry external dcl 1038 ref 954 mrds_dm_db_secured$get_secured_status 000150 constant entry external dcl 1152 ref 451 mrds_dm_get_attributes 000032 constant entry external dcl 1039 ref 698 mrds_dm_get_attributes$set_db_view 000130 constant entry external dcl 1125 ref 699 942 mrds_dm_get_attributes$set_user_view 000126 constant entry external dcl 1125 ref 697 mrds_dm_get_header 000034 constant entry external dcl 1040 ref 432 mrds_dm_get_relations 000036 constant entry external dcl 1041 ref 600 mrds_dm_open 000040 constant entry external dcl 1042 ref 421 mrds_dm_secured_submodel 000162 constant entry external dcl 1159 ref 480 mrds_dsl_get_version$get_path_info 000132 constant entry external dcl 1127 ref 191 mrds_dsm_close$force 000134 constant entry external dcl 1132 ref 955 mrds_dsm_get_relation_names 000142 constant entry external dcl 1136 ref 610 mrds_dsm_header based structure level 1 unaligned dcl 3-13 ref 956 mrds_dsm_open$read 000136 constant entry external dcl 1134 ref 392 mrds_dsm_read_header 000140 constant entry external dcl 1135 ref 399 mrds_dsm_read_relation 000144 constant entry external dcl 1137 ref 684 mrds_dsm_relation_names based structure level 1 unaligned dcl 5-17 ref 621 mrds_dsm_relation_names_ptr 006672 automatic pointer dcl 5-23 set ref 610* 611 616 619 621 mrds_error_$inc_secure_open 000152 external static fixed bin(35,0) dcl 1154 ref 494 mrds_error_$no_database 000154 external static fixed bin(35,0) dcl 1155 ref 201 mrds_error_$no_model_submodel 000156 external static fixed bin(35,0) dcl 1156 ref 201 mrds_path_info based structure level 1 dcl 9-22 mrds_path_info_ptr 006706 automatic pointer dcl 9-36 set ref 191* 194 197 198 209 mrds_path_info_structure_version 000127 constant fixed bin(17,0) initial dcl 9-38 set ref 191* mrds_version 54 based fixed bin(17,0) level 2 dcl 9-22 ref 198 mu_display_descriptor 000112 constant entry external dcl 1084 ref 762 mu_trim_descriptor 000124 constant entry external dcl 1123 ref 774 nargs 002200 automatic fixed bin(17,0) dcl 1085 set ref 174* 175 215 318 nattr based fixed bin(17,0) level 2 dcl 1005 set ref 757* 896 943 new_rd_ptr 006552 automatic pointer dcl 1147 set ref 172* 714* 716 717 730 732 750 751* 958 958 no 000120 constant bit(1) initial unaligned dcl 1086 set ref 147 154 160 161 164 556* 571 no_rb_attributes 33 based fixed bin(17,0) level 2 dcl 4-26 ref 712 891 957 norder 002201 automatic fixed bin(17,0) dcl 1087 set ref 626* 627 629* 635 644 660 nrelations 002202 automatic fixed bin(17,0) dcl 1088 set ref 625* nrels based fixed bin(17,0) level 2 in structure "mrds_dsm_relation_names" dcl 5-17 in procedure "cmdmi" ref 616 621 nrels based fixed bin(10,0) level 2 in structure "model_relations" dcl 8-5 in procedure "cmdmi" set ref 617* 625 627 629* 634* 635* 645 661 668 677 680 945 946 null builtin function dcl 1089 ref 150 156 157 162 163 166 168 170 171 172 194 400 422 433 549 556 556 601 611 670 685 700 751 892 895 897 917 943 944 945 946 947 948 952 953 954 956 957 958 1099 1138 num_attr based fixed bin(17,0) level 2 dcl 7-12 set ref 714* 716 717* 735 749 757 757 759 777 788 810 830 843 894 944 958 num_attr_alloc 006676 automatic fixed bin(10,0) dcl 7-29 set ref 712* 714 714 717 721 num_relations_alloc 006702 automatic fixed bin(10,0) dcl 8-9 set ref 616* 617 617 618 625* 634 634 options 006564 automatic varying char(80) dcl 1150 set ref 177* 179* 180* order_arg constant fixed bin(17,0) initial dcl 1090 ref 244 306 order_begin 002203 automatic fixed bin(17,0) dcl 1091 set ref 165* 246* 309 309* 315 339 626 639 order_end 002204 automatic fixed bin(17,0) dcl 1092 set ref 165* 313* 315 319* 626 639 ordering 002205 automatic bit(1) unaligned dcl 1093 set ref 164* 245* 333 624 659 out_acl_ptr 000014 internal static pointer dcl 1095 set ref 166* 548* 925* 952 952* out_atd 002206 automatic varying char(175) dcl 1096 set ref 555* 556 out_dir 002263 automatic char(168) unaligned dcl 1097 set ref 370* 378* 548* 550* 555 558* 563* 907* 913* 919* 921* 927* out_entry_name 002335 automatic char(32) unaligned dcl 1098 set ref 273* 370* 380 380* 515* 548* 550* 555 558* 563* 902* 907* 913* 919* 921* 927* out_iocb_ptr 002346 automatic pointer initial dcl 1099 set ref 556* 561* 902* 905* 911* 917* 948 949* 950* 973* 990* 995* 1099* out_len 002350 automatic fixed bin(24,0) dcl 1100 set ref 919* 925* out_ptr 002352 automatic pointer dcl 1101 set ref 166* 548* 549 925* 953 953* output_file_arg constant fixed bin(17,0) initial dcl 1094 ref 223 272 page_len 002426 automatic fixed bin(17,0) dcl 1103 set ref 167* 294* 294 296 296 296 297* 508 974 984 path_argument 002354 automatic char(168) unaligned dcl 1102 set ref 190* 370* pl_arg constant fixed bin(17,0) initial dcl 1104 ref 241 242 291 prog_name 002427 automatic varying char(32) dcl 1105 set ref 140* 146* 180* 228* 236* 517* 932* 953 rd_ptr 006700 automatic pointer dcl 7-31 set ref 168* 698* 700 727 730 735 749 750* 757 757 759 762 762 772 777 788 810 818 820 822 822 830 830 830 830 830 830 830 830 830 830 830 839 843 866 866 869 894 895* 944 944 rel_desc based structure level 1 unaligned dcl 7-12 set ref 714 716* 749 894 944 958 rel_name_arg constant fixed bin(17,0) initial dcl 1106 ref 221 306 308 relation 1 based char(32) array level 2 packed unaligned dcl 5-17 ref 619 relation_block based structure level 1 unaligned dcl 4-26 set ref 891 957 relation_name 1 based char(32) array level 2 packed unaligned dcl 8-5 set ref 619* 642* 646 646 647* 651* 662 664* 664 676 678 680 684 695 794 794 802 802 802 retrieval 000106 constant fixed bin(17,0) initial dcl 1107 set ref 421* right_margin 002440 automatic fixed bin(17,0) dcl 1108 set ref 707* 777* 778 806* 843* 844 rltn 002441 automatic fixed bin(17,0) dcl 1109 set ref 680* 680* 684 695 794 794 802 802 802* row 002442 automatic fixed bin(17,0) dcl 1110 set ref 708* 781* 781 791 791 rtrim builtin function dcl 1111 ref 359 480 480 480 480 480 480 555 555 676 678 772 802 802 802 830 830 839 901 secure_submodel 006664 automatic bit(1) unaligned dcl 1153 set ref 478* 480* 484 secured 1(01) based bit(1) level 2 packed unaligned dcl 2-20 ref 459 secured_view 002166 automatic bit(1) unaligned dcl 1064 set ref 448* 477* 818 sm_abs_path 006611 automatic varying char(168) dcl 1151 set ref 391* 485* 521* sm_attr_num 006473 automatic fixed bin(17,0) dcl 1140 set ref 721* 727 730 732 732 739* str_ptr 006464 automatic pointer dcl 1130 set ref 170* 684* 685 693 712 727 732 739 891 892* 957 957 stream_out 000106 constant fixed bin(17,0) initial dcl 1112 set ref 561* submodel 53(02) based bit(1) level 3 in structure "mrds_path_info" packed unaligned dcl 9-22 in procedure "cmdmi" ref 209 submodel 006466 automatic bit(1) unaligned dcl 1131 in procedure "cmdmi" set ref 169* 209* 363 390 417 431 479 485 511 521 599 682 693 710 890 955 submodel_iocb_ptr 006470 automatic pointer initial dcl 1138 set ref 392* 399* 610* 684* 955* 1138* substr builtin function dcl 1113 ref 257 310 766 766 suffix 002443 automatic char(32) unaligned dcl 1114 set ref 361* 362* 372* 380* 382* suffixed_name_$new_suffix 000060 constant entry external dcl 1052 ref 380 time_str 002453 automatic char(24) unaligned dcl 1118 set ref 440* 524* translate builtin function dcl 1119 ref 794 794 830 830 tssi_$clean_up_segment 000114 constant entry external dcl 1115 ref 952 tssi_$finish_segment 000116 constant entry external dcl 1116 ref 925 tssi_$get_segment 000120 constant entry external dcl 1117 ref 548 type 53 based structure level 2 dcl 9-22 unique_chars_ 000122 constant entry external dcl 1120 ref 556 unspec builtin function dcl 1121 set ref 716* version 000000 constant varying char(4) initial dcl 1122 set ref 517* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. A_ACCESS internal static bit(3) initial unaligned dcl 10-11 A_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 DIR_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 10-33 E_ACCESS internal static bit(3) initial unaligned dcl 10-11 E_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 M_ACCESS internal static bit(3) initial unaligned dcl 10-11 M_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 N_ACCESS internal static bit(3) initial unaligned dcl 10-11 N_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 RELATION_BLOCK_VERSION_1 internal static fixed bin(35,0) initial dcl 4-24 REW_ACCESS internal static bit(3) initial unaligned dcl 10-11 REW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 RE_ACCESS internal static bit(3) initial unaligned dcl 10-11 RE_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 RW_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 R_ACCESS internal static bit(3) initial unaligned dcl 10-11 R_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 SA_ACCESS internal static bit(3) initial unaligned dcl 10-11 SA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 SEG_ACCESS_MODE_NAMES internal static char(4) initial array unaligned dcl 10-30 SMA_ACCESS internal static bit(3) initial unaligned dcl 10-11 SMA_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 SM_ACCESS internal static bit(3) initial unaligned dcl 10-11 SM_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 S_ACCESS internal static bit(3) initial unaligned dcl 10-11 S_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 W_ACCESS internal static bit(3) initial unaligned dcl 10-11 W_ACCESS_BIN internal static fixed bin(5,0) initial dcl 10-36 mrds_dsm_relation_names_nrels_alloc automatic fixed bin(17,0) dcl 5-21 rb_number_of_attributes automatic fixed bin(35,0) dcl 4-23 relation_block_ptr automatic pointer dcl 4-22 NAMES DECLARED BY EXPLICIT CONTEXT. CLEANUP 012350 constant label dcl 936 ref 930 COMMON 001605 constant label dcl 150 ref 143 ERROR 012325 constant label dcl 932 ref 183 206 254 260 265 286 301 331 337 348 356 374 384 396 403 425 436 456 469 495 552 559 564 604 614 631 654 688 703 742 908 914 922 928 967 HAVE_LL_CTL 002261 constant label dcl 234 ref 231 MISSING_VALUE 003030 constant label dcl 328 ref 315 341 NEXT_ORDER 007335 constant label dcl 656 ref 648 RECHECK_ARG 002135 constant label dcl 217 ref 316 clean_up 012356 constant entry internal dcl 940 ref 427 936 cmdmi 001526 constant entry external dcl 27 cmdmt 001557 constant entry external dcl 145 conv_error 012646 constant entry internal dcl 962 ref 279 293 create_mrds_dm_include 001536 constant entry external dcl 27 create_mrds_dm_table 001567 constant entry external dcl 145 new_page 012722 constant entry internal dcl 971 ref 788 791 985 output_buffer 012745 constant entry internal dcl 978 ref 569 574 592 593 796 835 854 887 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 14262 14452 13322 14272 Length 15260 13322 170 571 740 6 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cmdmi 3880 external procedure is an external procedure. on unit on line 279 64 on unit on unit on line 293 64 on unit on unit on line 427 64 on unit clean_up 92 internal procedure is called by several nonquick procedures. conv_error 108 internal procedure is called by several nonquick procedures. new_page internal procedure shares stack frame of external procedure cmdmi. output_buffer internal procedure shares stack frame of external procedure cmdmi. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 attr_desc_ptr cmdmi 000012 dm_area_ptr cmdmi 000014 out_acl_ptr cmdmi STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cmdmi 000100 arg_len cmdmi 000102 arg_ptr cmdmi 000104 attr cmdmi 000105 b cmdmi 000106 below_sw cmdmi 000107 blank_lines cmdmi 000110 box_len cmdmi 000111 brief_table cmdmi 000112 buf cmdmi 001526 buf_next_column cmdmi 001527 current_date_time cmdmi 001544 code cmdmi 001545 control_arg cmdmi 001564 dm_abs_path cmdmi 001636 dm_adir cmdmi 001710 dm_aentry_name cmdmi 001720 dm_dir cmdmi 001772 dm_entry_name cmdmi 002002 dm_path cmdmi 002054 dm_ptr cmdmi 002056 er_mess cmdmi 002157 expect cmdmi 002160 have_of cmdmi 002161 have_relation cmdmi 002162 i cmdmi 002163 iarg cmdmi 002164 creating_incl cmdmi 002165 based_decls cmdmi 002166 secured_view cmdmi 002167 j cmdmi 002170 legend_len cmdmi 002171 line_len cmdmi 002172 lines_left cmdmi 002173 max_buf_len cmdmi 002174 max_rel_name_len cmdmi 002176 mr_order_ptr cmdmi 002200 nargs cmdmi 002201 norder cmdmi 002202 nrelations cmdmi 002203 order_begin cmdmi 002204 order_end cmdmi 002205 ordering cmdmi 002206 out_atd cmdmi 002263 out_dir cmdmi 002335 out_entry_name cmdmi 002346 out_iocb_ptr cmdmi 002350 out_len cmdmi 002352 out_ptr cmdmi 002354 path_argument cmdmi 002426 page_len cmdmi 002427 prog_name cmdmi 002440 right_margin cmdmi 002441 rltn cmdmi 002442 row cmdmi 002443 suffix cmdmi 002453 time_str cmdmi 002461 db_version cmdmi 002462 local_area cmdmi 006462 hd_ptr cmdmi 006464 str_ptr cmdmi 006466 submodel cmdmi 006467 discard_code cmdmi 006470 submodel_iocb_ptr cmdmi 006472 found cmdmi 006473 sm_attr_num cmdmi 006474 model_path cmdmi 006546 entry_suffix cmdmi 006550 attr_num cmdmi 006551 model_type cmdmi 006552 new_rd_ptr cmdmi 006554 model_name cmdmi 006564 options cmdmi 006611 sm_abs_path cmdmi 006664 secure_submodel cmdmi 006666 mrds_authorization_ptr cmdmi 006670 database_state_ptr cmdmi 006672 mrds_dsm_relation_names_ptr cmdmi 006674 dmh_ptr cmdmi 006676 num_attr_alloc cmdmi 006700 rd_ptr cmdmi 006702 num_relations_alloc cmdmi 006704 mr_ptr cmdmi 006706 mrds_path_info_ptr cmdmi 006740 b output_buffer THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_char_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry set_chars_eis index_chars_eis any_to_any_truncate_op_alloc_ op_freen_ op_empty_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ com_err_ cu_$arg_count cu_$arg_ptr date_time_ delete_$ptr expand_pathname_ get_system_free_area_ get_wdir_ hcs_$get_link_target hcs_$status_minf ioa_ ioa_$ioa_switch ioa_$ioa_switch_nnl ioa_$rsnnl iox_$attach_name iox_$close iox_$detach_iocb iox_$open mrds_dm_authorization$get_user_class mrds_dm_close mrds_dm_db_secured$get_secured_status mrds_dm_get_attributes mrds_dm_get_attributes$set_db_view mrds_dm_get_attributes$set_user_view mrds_dm_get_header mrds_dm_get_relations mrds_dm_open mrds_dm_secured_submodel mrds_dsl_get_version$get_path_info mrds_dsm_close$force mrds_dsm_get_relation_names mrds_dsm_open$read mrds_dsm_read_header mrds_dsm_read_relation mu_display_descriptor mu_trim_descriptor suffixed_name_$new_suffix tssi_$clean_up_segment tssi_$finish_segment tssi_$get_segment unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$bad_conversion error_table_$badcall error_table_$badopt error_table_$inconsistent error_table_$noarg error_table_$wrong_no_of_args mrds_data_$submodel_dir_name mrds_error_$inc_secure_open mrds_error_$no_database mrds_error_$no_model_submodel LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 1099 001514 1128 001516 1138 001521 27 001525 140 001544 141 001551 142 001553 143 001555 145 001556 146 001575 147 001602 148 001603 150 001605 153 001610 154 001611 155 001612 156 001615 157 001616 158 001617 159 001620 160 001622 161 001623 162 001624 163 001626 164 001627 165 001630 166 001632 167 001635 168 001637 169 001641 170 001642 171 001643 172 001644 174 001645 175 001653 176 001656 177 001661 179 001671 180 001676 183 001732 186 001733 190 001753 191 001760 194 002021 197 002034 198 002040 200 002042 201 002044 204 002051 206 002101 209 002102 215 002110 216 002117 217 002135 221 002137 223 002154 225 002167 226 002213 228 002217 230 002250 231 002251 232 002255 234 002261 236 002263 237 002312 238 002313 239 002314 240 002316 241 002317 242 002326 243 002335 244 002341 245 002343 246 002345 247 002346 248 002347 249 002357 251 002365 252 002367 253 002414 254 002417 256 002420 257 002421 258 002425 259 002461 260 002464 263 002465 264 002521 265 002524 267 002525 268 002532 272 002533 273 002535 274 002542 275 002544 277 002545 279 002550 280 002572 281 002602 282 002603 283 002620 285 002651 286 002654 288 002655 291 002656 293 002661 294 002703 295 002713 296 002714 297 002722 300 002761 301 002764 303 002765 306 002766 308 002773 309 002777 310 003003 313 003010 314 003013 315 003014 316 003016 318 003017 319 003022 320 003023 324 003024 326 003026 328 003030 330 003033 331 003063 333 003064 335 003070 336 003073 337 003117 339 003120 340 003122 341 003125 344 003126 345 003152 346 003154 348 003205 352 003206 353 003235 354 003237 356 003274 359 003275 361 003334 362 003343 363 003346 365 003355 369 003361 370 003363 371 003407 372 003411 374 003445 378 003446 380 003455 381 003520 382 003523 384 003557 388 003560 390 003567 391 003571 392 003576 393 003617 394 003621 396 003652 399 003653 400 003670 401 003676 403 003727 408 003730 410 003736 411 003741 412 003743 413 003747 417 003751 419 003760 421 003763 422 004003 423 004011 425 004042 427 004043 431 004065 432 004067 433 004104 434 004112 436 004143 440 004144 442 004162 448 004206 449 004207 451 004213 453 004234 454 004236 456 004267 459 004270 464 004274 466 004326 467 004330 469 004361 472 004362 477 004367 478 004371 479 004372 480 004375 484 004507 485 004512 491 004620 494 004704 495 004707 508 004710 509 004712 511 004723 513 004730 515 004732 516 004764 517 005015 521 005055 523 005116 524 005154 525 005205 526 005237 529 005272 530 005274 531 005301 532 005310 534 005312 535 005317 536 005370 538 005373 539 005410 541 005441 542 005474 545 005524 548 005551 549 005602 550 005606 552 005643 555 005644 556 005732 557 006012 558 006015 559 006052 561 006053 562 006072 563 006074 564 006131 569 006132 571 006142 572 006143 574 006150 575 006155 576 006157 579 006171 580 006203 581 006267 582 006346 583 006361 584 006362 585 006364 586 006417 588 006422 589 006505 590 006546 591 006604 592 006642 593 006654 599 006661 600 006663 601 006700 602 006706 604 006737 606 006740 610 006741 611 006756 612 006764 614 007015 616 007016 617 007020 618 007032 619 007041 620 007051 621 007053 624 007060 625 007064 626 007067 627 007073 628 007075 629 007100 631 007140 634 007141 635 007153 638 007157 639 007160 640 007167 641 007205 642 007206 643 007217 644 007221 645 007231 646 007241 647 007257 648 007264 650 007265 651 007267 653 007331 654 007334 656 007335 659 007337 660 007341 661 007343 662 007353 663 007363 664 007364 666 007373 668 007375 669 007402 670 007404 676 007406 677 007421 678 007431 679 007452 680 007454 682 007472 684 007476 685 007530 686 007536 688 007567 693 007570 695 007577 697 007606 698 007613 699 007632 700 007637 701 007645 703 007676 706 007677 707 007702 708 007704 710 007706 712 007710 714 007713 716 007725 717 007735 721 007737 723 007745 724 007746 725 007750 727 007752 729 007772 730 007774 732 010005 734 010016 735 010017 738 010024 739 010026 742 010067 745 010070 747 010071 749 010073 750 010100 751 010102 757 010104 759 010117 762 010127 763 010150 764 010152 765 010164 766 010166 768 010235 772 010237 773 010256 774 010260 775 010323 777 010331 778 010336 780 010346 781 010351 783 010352 785 010356 788 010360 790 010367 791 010370 792 010407 793 010411 794 010413 796 010460 797 010464 799 010465 800 010470 801 010516 802 010551 804 010643 805 010672 806 010673 810 010675 818 010705 820 010715 822 010717 829 010725 830 010727 835 011103 836 011110 839 011111 840 011127 843 011142 844 011147 846 011157 847 011171 848 011203 849 011205 850 011207 851 011210 854 011215 856 011222 857 011250 858 011257 859 011310 860 011313 861 011341 864 011345 866 011366 867 011442 869 011454 870 011515 872 011527 873 011531 874 011572 877 011604 878 011650 880 011655 881 011657 882 011661 883 011663 884 011665 885 011666 887 011673 890 011700 891 011702 892 011710 894 011712 895 011717 896 011721 897 011727 898 011732 900 011734 901 011736 902 011765 905 012021 906 012032 907 012034 908 012071 911 012072 912 012103 913 012105 914 012142 917 012143 919 012145 920 012203 921 012205 922 012242 925 012243 926 012264 927 012266 928 012323 930 012324 932 012325 934 012346 936 012350 938 012354 940 012355 942 012363 943 012367 944 012401 945 012413 946 012425 947 012437 948 012446 949 012453 950 012464 952 012476 953 012511 954 012557 955 012576 956 012610 957 012617 958 012632 960 012644 962 012645 964 012653 966 012713 967 012717 971 012722 973 012723 974 012742 976 012744 978 012745 984 012747 985 012751 986 012756 989 012763 990 012773 991 013010 992 013012 994 013014 995 013023 996 013047 998 013051 ----------------------------------------------------------- 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