COMPILATION LISTING OF SEGMENT linus_lila_select Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 1003.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 linus_lila_select: 19 proc (lcb_ptr, lsh_ptr, inner, td_ptr, code); 20 21 /* DESCRIPTION: 22* 23* This procedure processes the select clause of a LILA block. If this is an 24* inner LILA block, the second leaf of a predicate term is created. If this 25* is an outer block, a list of selected items is created in the lila stack for 26* the block. 27* 28* 29* 30* HISTORY: 31* 32* 77-07-01 J. A. Weeldreyer: Initially written. 33* 34* 78-03-01 J. A. Weeldreyer: Modified to detect invalid tokens in select 35* clause. 36* 37* 78-04-01 J. A. Weeldreyer: Modified to give better diagnostics for 38* constant expresions or scalar functions. 39* 40* 78-06-01 J. A. Weeldreyer: Modified to disallow update of temp tables. 41* 42* 78-08-01 J. A. Weeldreyer: Modified to conform to new token data. 43* 44* 79-02-01 J. C. C. Jagernauth: Modified to access version 4 resultant 45* information. 46* 47* 80-01-08 Rickie E. Brinegar: modified to pass linus_lila_alloc_lit a 48* descriptor pointer rather than an assign_ descriptor type and to eliminate 49* the assign_ length parameter. 50* 51* 80-04-13 Rickie E. Brinegar: to use a work area defined on 52* lcb.lila_area_ptr instead of getting system free area. 53* 54* 80-06-23 Jim Gray: to capture select * with >1 table in from clause. 55* 56* 80-09-15 Rickie E. Brinegar: Modified to not call dsl_$get_rstl_info but to 57* use the linus_rel_array instead. 58* 59* 81-02-03 Rickie E. Brinegar: Added the temp table names. Changed 60* add_sel_tuple to use the temp tuple names instead of temp table indices with 61* the char builtin used on them. Added the rel builtin to the declarations. 62* Removed the unused entry points dsl(_ v1_)$get_(rslt temp)_info. 63* 64* 81-06-19 Rickie E. Brinegar: Removed the use of lcb.new_version and the 65* copying of descriptors returned by dsl_$get_(temp rslt)_info into the 66* rslt_info structure as the routine that returns the rslt_info structure has 67* been modified to fill in the descriptors in the rslt_info_structure. 68* 69* 81-07-15 Rickie E. Brinegar: Removed useless cleanup condition handler. 70* 71* 82-11-28 Dave Schimke: Added code to the internal proc add_sel_item to also 72* save the table name for each column in select_info.user_item.table_name. 73* This is for use in the default column names generated by linus_table. 74* 75* 83-07-14 Dave Schimke: Changed select_info.user_item.table_name (added 76* above) to contain the name of the tuple variable used in the selection 77* expression rather than the actual database table name. This was requested 78* by users during the report_writer controlled release. 79* 80* 83-08-18 Al Dupuis: Fixed a bug caused by the above change (83-07-14) in 81* the add_sel_tuple procedure. Rather than take it from 82* ls_block.range_items.tup_var (i), it only takes it from there when mvar 83* is set to something like "V00001". The variable mvar contains the correct 84* tuple variable in all other cases. 85**/ 86 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 87 88 2 1 /* BEGIN INCLUDE FILE linus_ef_data.incl.pl1 -- jaw 7/21/77 */ 2 2 2 3 dcl 1 ef_data aligned based (ed_ptr), /* structure for passing expr. and fun. data among programs */ 2 4 2 var_name char (32), /* name of tuple variable */ 2 5 2 bit_length fixed bin (35), /* bit length of result */ 2 6 2 desc bit (36), /* descriptor of result */ 2 7 2 assn_ptr ptr, /* pointer to result value */ 2 8 2 assn_type fixed bin, /* assign_ type code of result */ 2 9 2 assn_len fixed bin (35), /* assign_ length */ 2 10 2 nmrds_items fixed bin, /* number of mrds items returned */ 2 11 2 mrds_items (linus_data_$max_expr_items), /* previously unselected mrds items referenced 2 12* in the expression */ 2 13 3 attr_name char (32), /* name of attribute */ 2 14 3 domain_name char (32), /* domain of attribute */ 2 15 3 bit_length fixed bin (35), /* attrib. bit length */ 2 16 3 desc bit (36), /* attrib. descriptor */ 2 17 3 assn_ptr ptr, /* pointer to receiving field of attr. */ 2 18 3 assn_type fixed bin, /* assign_ type code of attr */ 2 19 3 assn_len fixed bin (35), /* assign_ length for attr. */ 2 20 2 ef_ptr ptr; /* pointer to expr. status */ 2 21 2 22 dcl ed_ptr ptr; 2 23 2 24 /* END INCLUDE FILE linus_ef_data.incl.pl1 */ 89 90 3 1 /* BEGIN INCLUDE FILE linus_ls_header.incl.pl1 -- jaw 7/28/77 */ 3 2 3 3 dcl 1 ls_header aligned based (lsh_ptr), /* header for LILA stack */ 4 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 4 2 4 3 2 type fixed bin, /* type of frame: 4 4* 1 => header, 4 5* 2 => set value, 4 6* 3 => lila set, 4 7* 4 => lila block */ 4 8 2 back_ptr ptr, /* pointer to previous frame */ 4 9 2 fwd_ptr ptr, /* pointer to next frame */ 4 10 4 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 3 4 3 5 2 cur_ptr ptr, /* pointer to current frame */ 3 6 2 src_ptr ptr, /* pointer to LILA source string */ 3 7 2 trans_failed bit (1) unal, /* on if translate failed */ 3 8 2 from_token bit (1) unal, /* on if the calling routine is linus_lila_from */ 3 9 2 reserved bit (34) unal, 3 10 2 cur_pos fixed bin (35), /* current position in source string */ 3 11 2 line_data (0 : lcb.lila_count), /* data for each source line */ 3 12 3 lno char (4), /* line number */ 3 13 3 last_char fixed bin (35); /* index of last char */ 3 14 3 15 dcl lsh_ptr ptr; 3 16 3 17 /* END INCLUDE FILE linus_ls_header.incl.pl1 */ 91 92 5 1 /* BEGIN INCLUDE FILE linus_ls_set.incl.pl1 -- jaw 7/27/78 */ 5 2 5 3 dcl 1 ls_set aligned based (lss_ptr), /* lila stack frame for lila set */ 6 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 6 2 6 3 2 type fixed bin, /* type of frame: 6 4* 1 => header, 6 5* 2 => set value, 6 6* 3 => lila set, 6 7* 4 => lila block */ 6 8 2 back_ptr ptr, /* pointer to previous frame */ 6 9 2 fwd_ptr ptr, /* pointer to next frame */ 6 10 6 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 5 4 5 5 2 nselects fixed bin, /* number of items selected */ 5 6 2 nblocks fixed bin, /* number of lila blocks in stack */ 5 7 2 nops fixed bin, /* number of set operators in stack */ 5 8 2 op_stack (linus_data_$max_set_stack_size), /* the set op stack */ 5 9 3 br_cnt fixed bin (17) unal, /* bracket count of oper. */ 5 10 3 key fixed bin (17) unal, /* token key of operator */ 5 11 2 br_cnt fixed bin, /* current bracket count */ 5 12 2 dup_flag bit (1) unal, /* on if DUP encountered */ 5 13 2 unique_flag bit (1) unal, /* on if UNIQUE encountered */ 5 14 2 rb_flag bit (1) unal, /* on if right bracket allowed */ 5 15 2 lb_flag bit (1) unal, /* on if left bracket allowed */ 5 16 2 setop_flag bit (1) unal, /* on if set op allowed */ 5 17 2 select_flag bit (1) unal, /* on if lila block allowed */ 5 18 2 end_flag bit (1) unal, /* on if end of set allowed */ 5 19 2 first_block bit (1) unal, /* on if no lila block yet processed */ 5 20 2 inv_setop bit (1) unal, /* on if a lila block cannot be included in a set oper. */ 5 21 2 reserved bit (9) unal, 5 22 2 var_ind fixed bin (17) unal, /* number for next generated variable */ 5 23 2 domain_info (mrds_data_$max_select_items), /* domain info for each selected attr. */ 5 24 3 name char (32), /* domain name */ 5 25 3 bit_length fixed bin (35), /* bit length of domain */ 5 26 3 desc bit (36), /* descriptor for domain */ 5 27 3 assn_ptr ptr, /* ptr to receiving field for this attr. */ 5 28 3 assn_type fixed bin, /* assign_ type code for this domain */ 5 29 3 assn_len fixed bin (35), /* assign_ length for this domain */ 5 30 2 si_ptr ptr, /* pointer to select info structure */ 5 31 2 blk_hd_ptr ptr; /* pointer to top item of block stack */ 5 32 5 33 dcl lss_ptr ptr; 5 34 5 35 /* END INCLUDE FILE linus_ls_set.incl.pl1 */ 93 94 7 1 /* BEGIN INCLUDE FILE linus_ls_block.incl.pl1 -- jaw 8/7/78 */ 7 2 7 3 dcl 1 ls_block aligned based (lsb_ptr), /* lila stack frame for outer lila block */ 8 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 8 2 8 3 2 type fixed bin, /* type of frame: 8 4* 1 => header, 8 5* 2 => set value, 8 6* 3 => lila set, 8 7* 4 => lila block */ 8 8 2 back_ptr ptr, /* pointer to previous frame */ 8 9 2 fwd_ptr ptr, /* pointer to next frame */ 8 10 8 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 7 4 7 5 2 reserved bit (36) unal, 7 6 2 ib_level fixed bin, /* current depth of inner blocks */ 7 7 2 nrs_chars fixed bin, /* total chars. in range strings */ 7 8 2 nritems fixed bin, /* current number of range items */ 7 9 2 range_items (linus_data_$max_range_items), 7 10 3 tup_var char (32) var, /* name of linus tuple variable */ 7 11 3 mrds_var char (32) var, /* name of mrds tuple variable */ 7 12 3 rel_name char (32) var, /* name of relation */ 7 13 3 rel_index fixed bin (35), /* rel. index if temp tab */ 7 14 3 level fixed bin, /* level of block generating item */ 7 15 3 arg_ptr ptr, 7 16 3 desc_ptr ptr, 7 17 2 nselects fixed bin, /* number of select items currently defined */ 7 18 2 sel_items (mrds_data_$max_select_items) char (mrds_data_$max_token_size) var, /* the mrds select items */ 7 19 2 nprops fixed bin, /* number of operators in pred stack */ 7 20 2 pred_op_stack (linus_data_$max_pred_stack_size), 7 21 3 key fixed bin (17) unal, 7 22 3 p_cnt fixed bin (17) unal, /* current paren count */ 7 23 2 pred_pcnt fixed bin, /* current paren. count in predicate */ 7 24 2 term_op fixed bin, /* rel. op. for current term */ 7 25 2 nterms fixed bin, /* no. of terms currently in term stack */ 7 26 2 dflt_ritem fixed bin, /* index of range item to be used for default */ 7 27 2 nrange_args fixed bin, /* no. of args for temp rel indexes */ 7 28 2 rs_hd_ptr ptr, /* pointer to head of range strings */ 7 29 2 term_hd_ptr ptr, /* pointer to top item in term stack */ 7 30 2 leaf_ptr (2) ptr; /* ptr to mrds block for each leaf of current term */ 7 31 7 32 dcl lsb_ptr ptr; 7 33 7 34 /* END INCLUDE FILE linus_ls_block.incl.pl1 */ 95 96 9 1 /* BEGIN INCLUDE FILE linus_mrds_block.incl.pl1 -- jaw 7/21/77 */ 9 2 9 3 dcl 1 mrds_block aligned based (mblk_ptr), /* partial mrds selection expr */ 9 4 2 fwd_ptr ptr, /* pointer to previous item in stack */ 9 5 2 sel_offset fixed bin (35), /* offset of first select item in mrds_string */ 9 6 2 sel_length fixed bin (35), /* length of first select list in mrds string */ 9 7 2 nval_args fixed bin, /* number of value args */ 9 8 2 val_args (nval_args_init refer (mrds_block.nval_args)), 9 9 3 arg_ptr ptr, 9 10 3 desc_ptr ptr, 9 11 2 ms_len fixed bin (35), /* length of the mrds string */ 9 12 2 mrds_string char (ms_len_init refer (mrds_block.ms_len)) var; 9 13 9 14 dcl nval_args_init fixed bin; 9 15 dcl ms_len_init fixed bin (35); 9 16 dcl mblk_ptr ptr; 9 17 9 18 /* END INCLUDE FILE linus_mrds_block.incl.pl1 */ 97 98 10 1 /* BEGIN INCLUDE FILE -- linus_rel_array.incl.pl1 -- reb 09/09/80 10 2* 10 3* 80-09-09 Rickie E. Brinegar: Initially written. 10 4* 10 5* 81-01-29 Rickie E. Brinegar: changed to comform to standards for include 10 6* files. 10 7* 10 8**/ 10 9 10 10 dcl 1 linus_rel_array based (linus_rel_array_ptr), 10 11 2 num_of_rels fixed bin, 10 12 2 rels (num_of_rels_init refer (linus_rel_array.num_of_rels)), 10 13 3 rel_name char (32), 10 14 3 rslt_info_ptr ptr; 10 15 10 16 dcl linus_rel_array_ptr ptr; 10 17 10 18 dcl num_of_rels_init fixed bin init (0); 10 19 10 20 /* END INCLUDE FILE linus_rel_array.incl.pl1 */ 10 21 99 100 11 1 /* BEGIN INCLUDE FILE linus_select_info.incl.pl1 */ 11 2 /* History: 77-07-29 J. A. Weeldreyer: Originally written. 11 3* Modified: 82-18-82 Dave Schimke: Added user_item.table_name 11 4**/ 11 5 dcl 1 select_info aligned based (si_ptr), /* info from LILA select clause */ 11 6 2 set_fn bit (1) unal, /* on if set fn to be applied */ 11 7 2 se_flags unal, /* flags pertaining to selection expr. */ 11 8 3 val_ret bit (1) unal, /* valid for retrieval */ 11 9 3 val_dtt bit (1) unal, /* valid for define_temp_table */ 11 10 3 val_del bit (1) unal, /* valid for delete */ 11 11 3 val_mod bit (1) unal, /* valid for modify */ 11 12 2 dup_flag bit (1) unal, /* on if dup explic. spec. somewhere */ 11 13 2 unique_flag bit (1) unal, /* on if unique explic. spec. somewhere */ 11 14 2 pad bit (29) unal, /* reserved */ 11 15 2 prior_sf_ptr ptr, /* pointer to set fns for prior eval. */ 11 16 2 se_ptr ptr, /* pointer to mrds selection expression */ 11 17 2 sel_items_ptr ptr, /* pointer to list of selected items */ 11 18 2 sel_items_len fixed bin, /* length in characters of list of selected items */ 11 19 2 se_len fixed bin (35), /* length of mrds sel. expr. */ 11 20 2 nsv_alloc fixed bin, /* no. of se. vals aloc. */ 11 21 2 nmi_alloc fixed bin, /* no. of mrds items alloc. */ 11 22 2 nui_alloc fixed bin, /* no. of user items alloc. */ 11 23 2 nsevals fixed bin, /* number of selection expr. vaules */ 11 24 2 n_mrds_items fixed bin, /* no. of items in mrds select list */ 11 25 2 n_user_items fixed bin, /* no. of items user will see */ 11 26 2 se_vals (nsv_init refer (select_info.nsv_alloc)), 11 27 3 arg_ptr ptr, 11 28 3 desc_ptr ptr, 11 29 2 mrds_item (nmi_init refer (select_info.nmi_alloc)), /* mrds select items */ 11 30 3 arg_ptr ptr, /* pointer to receiving field */ 11 31 3 bit_len fixed bin (35), /* bit length of receiving field */ 11 32 3 desc bit (36), /* descriptor for receiving field */ 11 33 3 assn_type fixed bin, /* type code for assign_ */ 11 34 3 assn_len fixed bin (35), /* length for assign_ */ 11 35 2 user_item (nui_init refer (select_info.nui_alloc)), /* user select item */ 11 36 3 name char (32) var, /* name for col. header */ 11 37 3 table_name char (32) var, /* name of containing linus table */ 11 38 3 item_type fixed bin, /* indicates type of item: 11 39* 1 => raw mrds, 11 40* 2 => expr. */ 11 41 3 rslt_desc bit (36), /* descriptor for expr. result */ 11 42 3 rslt_bit_len fixed bin (35), /* bit length of expr. result */ 11 43 3 rslt_assn_ptr ptr, /* pointer to expr. result storage loc. */ 11 44 3 rslt_assn_type fixed bin, /* assign_ type code of expr. result */ 11 45 3 rslt_assn_len fixed bin (35), /* assign_ length for expr. result */ 11 46 3 item_ptr ptr; /* pointer to item or expr. or applied set_func. structure */ 11 47 11 48 dcl (nsv_init, nmi_init, nui_init) fixed bin; 11 49 dcl si_ptr ptr; 11 50 11 51 /* END INCLUDE FILE linus_select_info.incl.pl1 */ 101 102 12 1 /* BEGIN INCLUDE FILE linus_temp_tab_names.incl.pl1 -- jaw 6/16/77 */ 12 2 12 3 dcl temp_tab_names (mrds_data_$max_temp_rels) char (32) based (ttn_ptr); /* names of temp rels in slot corr. to rel. index */ 12 4 12 5 dcl ttn_ptr ptr; 12 6 12 7 /* END INCLUDE FILE linus_temp_tab_names.incl.pl1 */ 103 104 13 1 /* BEGIN INCLUDE FILE linus_token_data.incl.pl1 -- jaw 8/7/78 */ 13 2 13 3 dcl 1 token_data aligned based (td_ptr), /* data for lila tokens */ 13 4 2 key fixed bin (17) unal, /* key of token */ 13 5 2 must_free bit (1) unal, /* on if value must be freed */ 13 6 2 temp_tab bit (1) unal, /* on if temporary table */ 13 7 2 reserved bit (16) unal, 13 8 2 mvar char (32) var, /* mrds variable if identifier */ 13 9 2 lvar char (32) var, /* linus variable if identifier */ 13 10 2 length fixed bin (35), /* char length of token value */ 13 11 2 t_ptr ptr; /* points to token value */ 13 12 13 13 dcl ((NULL init (0)), 13 14 (RP init (1)), 13 15 (COL_SPEC init (2)), 13 16 (LINUS_VAR init (3)), 13 17 (CONST init (4)), 13 18 (SET_FN init (5)), 13 19 (SCAL_FN init (6)), 13 20 (LP init (7)), 13 21 (STAR init (8)), 13 22 (DIV init (9)), 13 23 (PLUS init (10)), 13 24 (MINUS init (11)), 13 25 (TAB_NAME init (12)), 13 26 (ROW_TAB_PAIR init (13)), 13 27 (UNION init (14)), 13 28 (INTER init (15)), 13 29 (DIFFER init (16)), 13 30 (ROW_DES init (17)), 13 31 (LB init (18)), 13 32 (RB init (19)), 13 33 (SELECT init (20)), 13 34 (NOT init (21)), 13 35 (AND init (22)), 13 36 (OR init (23)), 13 37 (EQ init (24)), 13 38 (NE init (25)), 13 39 (GT init (26)), 13 40 (GE init (27)), 13 41 (LT init (28)), 13 42 (LE init (29)), 13 43 (FROM init (30)), 13 44 (WHERE init (31)), 13 45 (DUP init (32)), 13 46 (UNIQUE init (33)), 13 47 (COMMA init (34))) fixed bin int static options (constant); 13 48 13 49 dcl td_ptr ptr; 13 50 13 51 /* END INCLUDE FILE linus_token_data.incl.pl1 */ 105 106 14 1 /* BEGIN INCLUDE FILE mrds_rslt_info.incl.pl1 rgl 07/22/77 */ 14 2 14 3 /* Modified by R. Lackey 09/20/76 to handle inverted attributes */ 14 4 14 5 /* Modified by D. Woodka 06/28/82 to fix size condition */ 14 6 14 7 dcl 1 rslt_info aligned based (rslt_ptr), /* resultant information description */ 14 8 2 num_attr fixed bin, /* number of attributes in view */ 14 9 2 num_key_attr fixed bin, /* number of key attributes in data relation */ 14 10 2 key_length fixed bin (35), /* length in bits of key portion of tuple */ 14 11 2 retrieve bit (1) unal, /* retrieve permitted = "1"b */ 14 12 2 modify bit (1) unal, /* modify permitted = "1"b */ 14 13 2 store bit (1) unal, /* store permitted = "1"b */ 14 14 2 delete bit (1) unal, /* delete permitted = "1"b */ 14 15 2 total_key bit (1) unal, /* on if view includes the total key */ 14 16 2 inversion bit (1) unal, /* On if this view contains any inverted attributes */ 14 17 2 reserved bit (30) unal, /* reserved for future use */ 14 18 2 attr (rslt_alloc refer (rslt_info.num_attr)), /* per attribute info */ 14 19 3 attr_name char (32), /* name of attribute */ 14 20 3 domain_name char (32), /* name of underlying domain */ 14 21 3 attr_length fixed bin (18), /* length of attribute data in bits */ 14 22 3 attr_index fixed bin (24), /* index to bit_offset in dbcbrw */ 14 23 3 descriptor bit (36) aligned, /* attribute description */ 14 24 3 key_flag bit (1) unal, /* key attribute = "1"b */ 14 25 3 inver_flag bit (1) unal, /* On if this attribute is inverted */ 14 26 3 unused bit (34) unal, /* reserved for future use */ 14 27 3 key_attr_order fixed bin, /* order no. of this key attr. */ 14 28 3 inver_iocb_index fixed bin; /* Index to inversion iocb in dbcbw */ 14 29 14 30 14 31 14 32 dcl rslt_ptr ptr; 14 33 14 34 dcl rslt_alloc fixed bin; 14 35 14 36 /* END INCLUDE FILE mrds_rslt_info.incl.pl1 */ 14 37 107 108 15 1 /* BEGIN INCLUDE FILE mdbm_att_desc.incl.pl1 -- jccj 1/3/79 */ 15 2 15 3 dcl 1 att_desc aligned based (rdesc_ptr), 15 4 2 natts fixed bin, /* pointers to attribute descriptors in defined order */ 15 5 2 ptr (num_atts_init refer (att_desc.natts)) ptr; 15 6 15 7 dcl num_atts_init fixed bin; 15 8 dcl rdesc_ptr ptr; 15 9 15 10 /* END INCLUDE FILE mdbm_att_desc.incl.pl1 */ 15 11 109 110 111 dcl ( 112 code, /* Output: status code */ 113 icode, /* internal status code */ 114 bit_len_sink, /* repository for unused bit length */ 115 temp_cur_pos 116 ) fixed bin (35); /* temp curr. pos. for look ahead */ 117 dcl ( 118 inner, /* Input: on if inner LILA block */ 119 lb_flag, /* on if left bracket OK */ 120 sel_flag, /* on if "select" OK */ 121 end_flag, /* on if select list end OK */ 122 un_dup_flag, /* on if unique or dup OK */ 123 item_flag, /* on if select item OK */ 124 done 125 ) bit (1); /* completion indicator */ 126 127 dcl work_area area (sys_info$max_seg_size) based (lcb.lila_area_ptr); 128 dcl token char (token_data.length) based (token_data.t_ptr); 129 130 dcl 1 tok_data aligned like token_data; 131 132 dcl 1 expr_data aligned like ef_data; 133 134 dcl MRDS fixed bin int static options (constant) init (1); 135 dcl SEL_EXPR fixed bin int static options (constant) init (2); 136 137 dcl ( 138 linus_data_$max_pred_stack_size, 139 linus_data_$max_range_items, 140 linus_data_$max_expr_items, 141 linus_data_$max_set_stack_size, 142 linus_error_$bad_inner_select, 143 linus_error_$cant_alloc_lit, 144 linus_error_$const_expr_fn, 145 linus_error_$expr_not_alld, 146 linus_error_$incomplete_select, 147 linus_error_$no_table, 148 linus_error_$select_list_ovfl, 149 linus_error_$select_syntax, 150 linus_error_$too_many_tables, 151 linus_error_$union_compat, 152 mrds_data_$max_select_items, 153 mrds_data_$max_temp_rels, 154 mrds_data_$max_token_size, 155 sys_info$max_seg_size 156 ) fixed bin (35) ext; 157 158 dcl (addr, before, fixed, length, rel, null, substr) builtin; 159 160 dcl linus_assign_data entry (bit (36) aligned, fixed bin, fixed bin (35)); 161 dcl linus_lila_alloc_lit entry (ptr, ptr, ptr, fixed bin (35)); 162 dcl linus_lila_build_expr_tab entry (ptr, ptr, ptr, ptr, fixed bin (35)); 163 dcl linus_lila_build_expr_str 164 entry (ptr, ptr, ptr, ptr, char (*), fixed bin (35)); 165 dcl linus_lila_error entry (ptr, ptr, fixed bin (35), char (*)); 166 dcl linus_lila_get_token entry (ptr, ptr, fixed bin (35), ptr, fixed bin (35)); 167 dcl linus_lila_term$stack_term entry (ptr, ptr); 168 169 ttn_ptr = lcb.ttn_ptr; 170 linus_rel_array_ptr = lcb.rel_array_ptr; 171 mblk_ptr, rdesc_ptr, rslt_ptr = null; /* initiallize */ 172 lsb_ptr = ls_header.cur_ptr; 173 lss_ptr = ls_block.back_ptr; 174 si_ptr = ls_set.si_ptr; 175 176 if token_data.key = NULL then do; /* if no token passed in */ 177 call 178 linus_lila_get_token (lcb_ptr, lsh_ptr, ls_header.cur_pos, td_ptr, 179 icode); 180 if icode ^= 0 then 181 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 182 end; /* getting first token */ 183 184 lb_flag, /* initialize state flags */ 185 sel_flag = "1"b; /* can have { or select */ 186 end_flag, un_dup_flag, item_flag = "0"b; 187 188 done = "0"b; 189 190 do while (^done); 191 192 go to token_proc (token_data.key); /* go process the current token */ 193 194 token_proc (0): /* null */ 195 token_proc (1): /* ) */ 196 token_proc (3): /* linus variable */ 197 token_proc (4): /* constant */ 198 token_proc (5): /* set function */ 199 token_proc (9): /* / */ 200 token_proc (10): /* + */ 201 token_proc (11): /* - */ 202 token_proc (12): /* table name */ 203 token_proc (13): /* row_table_pair */ 204 token_proc (14): /* union */ 205 token_proc (15): /* inter */ 206 token_proc (16): /* differ */ 207 token_proc (19): /* } */ 208 token_proc (21): /* ^ */ 209 token_proc (22): /* & */ 210 token_proc (23): /* | */ 211 token_proc (24): /* = */ 212 token_proc (25): /* ^= */ 213 token_proc (26): /* > */ 214 token_proc (27): /* >= */ 215 token_proc (28): /* < */ 216 token_proc (29): /* <= */ 217 token_proc (30): /* from */ 218 token_proc (31): /* where */ 219 token_proc (34): /* , */ 220 if ^end_flag then /* if end not allowed */ 221 call 222 linus_lila_error (lcb_ptr, lsh_ptr, 223 linus_error_$incomplete_select, token); 224 if token_data.key ^= FROM then 225 call 226 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 227 token); 228 done = "1"b; /* to get out of loop */ 229 go to next; 230 231 token_proc (2): /* column specification */ 232 if ^item_flag then /* if select item not allowed */ 233 call 234 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 235 token); 236 237 temp_cur_pos = ls_header.cur_pos; /* save real pos. */ 238 call linus_lila_get_token (lcb_ptr, lsh_ptr, temp_cur_pos, 239 /* look at next token */ 240 addr (tok_data), icode); 241 if icode = 0 then /* if success. */ 242 if tok_data.key >= STAR & tok_data.key <= MINUS then 243 /* if arith oper. */ 244 call process_expr; /* is expr. process it */ 245 else call process_col_spec; /* is just col. spec. */ 246 else call process_col_spec; 247 248 un_dup_flag = "0"b; /* wont accept unique/dup anymore */ 249 end_flag = "1"b; /* allow termination */ 250 go to next; /* end column specification */ 251 252 token_proc (6): /* scalar function */ 253 token_proc (7): /* ( */ 254 if ^item_flag then /* if select item not allowed */ 255 call 256 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 257 token); 258 259 call process_expr; /* this is an expr, process it */ 260 261 end_flag = "1"b; /* reset state flags */ 262 un_dup_flag = "0"b; 263 264 go to next; /* end expr. */ 265 266 token_proc (8): /* * */ 267 if ^item_flag then /* if select item not allowed */ 268 call 269 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 270 token); 271 if inner then /* total tuple not allowed in inner block */ 272 call 273 linus_lila_error (lcb_ptr, lsh_ptr, 274 linus_error_$bad_inner_select, token); 275 if ls_block.nritems < 1 then /* if no range items */ 276 call 277 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$no_table, 278 token); 279 if ls_block.nritems > 1 then 280 call 281 linus_lila_error (lcb_ptr, lsh_ptr, 282 linus_error_$too_many_tables, token); 283 284 select_info.se_flags.val_mod = "0"b; /* cant mod. entire tuple */ 285 286 call 287 add_sel_tuple ((ls_block.range_items.tup_var (ls_block.dflt_ritem))) 288 ; /* add tuple to sel. list */ 289 end_flag = "1"b; /* set state flags */ 290 un_dup_flag = "0"b; 291 token_data.key = NULL; /* force new token */ 292 go to next; /* end * */ 293 294 token_proc (17): /* row descriptor */ 295 if ^item_flag then /* if select item not allowed */ 296 call 297 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 298 token); 299 if inner then /* total tuple not alowed in inner block */ 300 call 301 linus_lila_error (lcb_ptr, lsh_ptr, 302 linus_error_$bad_inner_select, token); 303 304 select_info.se_flags.val_mod = "0"b; /* cant mod. total tuple */ 305 306 call add_sel_tuple (token); /* add tuple to sel. list */ 307 308 token_data.key = NULL; /* force new token */ 309 end_flag = "1"b; /* set state flags */ 310 un_dup_flag = "0"b; 311 312 go to next; /* end row descr. */ 313 314 token_proc (18): /* { */ 315 if ^lb_flag then /* if { not expected */ 316 call 317 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 318 token); 319 token_data.key = NULL; /* force new token */ 320 lb_flag = "0"b; /* dont want another one */ 321 go to next; /* end { */ 322 323 token_proc (20): /* select */ 324 if ^sel_flag then /* if select not expected */ 325 call 326 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 327 token); 328 token_data.key = NULL; /* force new token */ 329 lb_flag, /* reset state flags */ 330 sel_flag = "0"b; 331 un_dup_flag, item_flag = "1"b; 332 go to next; /* end select */ 333 334 token_proc (32): /* dup */ 335 if ^un_dup_flag then /* if dup not expected */ 336 call 337 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 338 token); 339 ls_set.dup_flag = "1"b; /* remember */ 340 un_dup_flag = "0"b; 341 token_data.key = NULL; 342 go to next; /* end dup */ 343 344 token_proc (33): /* unique */ 345 if ^un_dup_flag then /* if unique not expected */ 346 call 347 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_syntax, 348 token); 349 ls_set.unique_flag = "1"b; /* remember */ 350 un_dup_flag = "0"b; 351 token_data.key = NULL; 352 go to next; 353 354 next: 355 if token_data.key = NULL then do; /* if need new token */ 356 call 357 linus_lila_get_token (lcb_ptr, lsh_ptr, ls_header.cur_pos, 358 td_ptr, icode); 359 if icode ^= 0 then 360 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 361 end; 362 363 end; /* main processing loop */ 364 365 code = 0; 366 exit: 367 return; 368 369 process_expr: 370 proc; 371 372 /* Procedure to handle expressions */ 373 374 dcl var char (32); 375 dcl i fixed bin; 376 377 if inner then do; /* if inner block */ 378 var = ""; 379 call 380 linus_lila_build_expr_str (lcb_ptr, lsh_ptr, td_ptr, mblk_ptr, var, 381 icode); /* build expr string, */ 382 if icode ^= 0 then 383 call linus_lila_error (lcb_ptr, lsh_ptr, icode, ""); 384 if var = "" then 385 call 386 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$const_expr_fn, 387 ""); 388 ls_block.leaf_ptr (2) = mblk_ptr; /* put in second leaf */ 389 mblk_ptr = null; 390 call linus_lila_term$stack_term (lcb_ptr, lsh_ptr); /* make into term */ 391 item_flag = "0"b; /* inner blocks have only one item */ 392 end; /* if inner block */ 393 394 else do; /* is outer LILA block */ 395 if ^ls_set.first_block then /* expr. not allowed for set opers. */ 396 call 397 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$expr_not_alld, 398 token); 399 ls_set.inv_setop = "1"b; 400 select_info.se_flags.val_dtt, /* exprs valid only for retrieve */ 401 select_info.se_flags.val_mod, select_info.se_flags.val_del = "0"b; 402 expr_data.nmrds_items = 0; 403 expr_data.var_name = " "; 404 405 call 406 linus_lila_build_expr_tab (lcb_ptr, lsh_ptr, td_ptr, 407 addr (expr_data), icode); /* build table for expr */ 408 if icode ^= 0 then 409 call linus_lila_error (lcb_ptr, lsh_ptr, icode, ""); 410 411 do i = 1 to expr_data.nmrds_items; /* process the required mrds items */ 412 if select_info.n_mrds_items >= select_info.nmi_alloc then 413 /* if overflow */ 414 call 415 linus_lila_error (lcb_ptr, lsh_ptr, 416 linus_error_$select_list_ovfl, ""); 417 select_info.n_mrds_items = select_info.n_mrds_items + 1; 418 select_info.mrds_item.bit_len (select_info.n_mrds_items) = 419 expr_data.mrds_items.bit_length (i); 420 select_info.mrds_item.desc (select_info.n_mrds_items) = 421 expr_data.mrds_items.desc (i); 422 select_info.mrds_item.arg_ptr (select_info.n_mrds_items) = 423 expr_data.mrds_items.assn_ptr (i); 424 select_info.mrds_item.assn_type (select_info.n_mrds_items) = 425 expr_data.mrds_items.assn_type (i); 426 select_info.mrds_item.assn_len (select_info.n_mrds_items) = 427 expr_data.mrds_items.assn_len (i); 428 end; /* mrds items loop */ 429 if select_info.n_user_items >= select_info.nui_alloc then 430 /* if user item ovfl */ 431 call 432 linus_lila_error (lcb_ptr, lsh_ptr, 433 linus_error_$select_list_ovfl, ""); 434 select_info.n_user_items = select_info.n_user_items + 1; 435 do i = 1 to ls_block.nritems 436 while (expr_data.var_name ^= ls_block.range_items.mrds_var (i)); 437 end; 438 select_info.user_item.name (select_info.n_user_items), 439 select_info.user_item.table_name (select_info.n_user_items) 440 = ls_block.range_items.tup_var (i); /* fill in user item info */ 441 442 select_info.user_item.item_type (select_info.n_user_items) = SEL_EXPR; 443 select_info.user_item.rslt_desc (select_info.n_user_items) = 444 expr_data.desc; 445 select_info.user_item.rslt_bit_len (select_info.n_user_items) = 446 expr_data.bit_length; 447 select_info.user_item.rslt_assn_ptr (select_info.n_user_items) = 448 expr_data.assn_ptr; 449 select_info.user_item.rslt_assn_type (select_info.n_user_items) = 450 expr_data.assn_type; 451 select_info.user_item.rslt_assn_len (select_info.n_user_items) = 452 expr_data.assn_len; 453 select_info.user_item.item_ptr (select_info.n_user_items) = 454 expr_data.ef_ptr; 455 end; /* if outer block */ 456 457 end process_expr; 458 459 process_col_spec: 460 proc; 461 462 /* Procedure to process a column spec. */ 463 464 dcl (i, j) fixed bin; 465 466 dcl rel_name char (32) init (""); 467 468 if inner then do; /* if inner block, merely place in second term leaf */ 469 nval_args_init = 0; /* set up mrds block */ 470 ms_len_init = token_data.length + length (token_data.mvar) + 1; 471 allocate mrds_block in (work_area); 472 mrds_block.fwd_ptr = null; 473 mrds_block.mrds_string = token_data.mvar || "." || token; 474 ls_block.leaf_ptr (2) = mblk_ptr; /* put in second leaf */ 475 mblk_ptr = null; 476 if token_data.must_free then 477 token_data.t_ptr = null; 478 call linus_lila_term$stack_term (lcb_ptr, lsh_ptr); /* add term to term stack */ 479 item_flag = "0"b; /* no more items for inner select */ 480 end; /* if inner block */ 481 482 else do; /* is outer block */ 483 if ls_block.nselects >= mrds_data_$max_select_items then 484 /* check overflow */ 485 call 486 linus_lila_error (lcb_ptr, lsh_ptr, 487 linus_error_$select_list_ovfl, token); 488 do i = 1 to ls_block.nritems 489 while (ls_block.range_items.mrds_var (i) ^= token_data.mvar); 490 end; /* search for range item */ 491 if ls_block.range_items.rel_name (i) = ".V." then do; 492 /* if temp rel. */ 493 select_info.se_flags.val_del, /* cant update temp tables */ 494 select_info.se_flags.val_mod = "0"b; 495 rel_name = temp_tab_names (ls_block.range_items.rel_index (i)); 496 end; 497 else rel_name = ls_block.range_items.rel_name (i); 498 if ls_set.first_block 499 then select_info.user_item.table_name (select_info.n_user_items + 1) 500 = ls_block.range_items.tup_var (i); 501 502 do j = 1 to linus_rel_array.num_of_rels 503 while (linus_rel_array.rels.rel_name (j) ^= rel_name); 504 end; 505 rslt_ptr = linus_rel_array.rels.rslt_info_ptr (j); 506 do i = 1 to rslt_info.num_attr 507 while (rslt_info.attr.attr_name (i) ^= token); 508 end; /* search for particular attr. */ 509 510 call add_sel_item (token_data.mvar, i); /* add item to select list */ 511 rslt_ptr = null; 512 end; /* if outer block */ 513 514 token_data.key = NULL; /* force new token */ 515 516 end process_col_spec; 517 518 add_sel_tuple: 519 proc (tup_var); 520 521 /* Procedure to add each attribute of a relation designated by tup_var to the 522* select list */ 523 524 dcl (i, j) fixed bin; 525 dcl rel_name char (32) init (""); 526 dcl tup_var char (*); 527 dcl mvar char (32) var; 528 529 do i = ls_block.nritems by -1 to 1 530 while (ls_block.range_items.tup_var (i) ^= tup_var); 531 end; /* search for range item */ 532 mvar = ls_block.range_items.mrds_var (i); 533 if ls_block.range_items.rel_name (i) = ".V." then do; /* if temp rel */ 534 select_info.se_flags.val_del, /* cant update temp tables */ 535 select_info.se_flags.val_mod = "0"b; 536 rel_name = temp_tab_names (ls_block.range_items.rel_index (i)); 537 end; 538 else rel_name = ls_block.range_items.rel_name (i); 539 540 do j = 1 to linus_rel_array.num_of_rels 541 while (linus_rel_array.rels.rel_name (j) ^= rel_name); 542 end; 543 rslt_ptr = linus_rel_array.rels.rslt_info_ptr (j); 544 if rslt_info.num_attr + ls_block.nselects > mrds_data_$max_select_items 545 then /* if overflow */ 546 call 547 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$select_list_ovfl, 548 token); 549 do i = 1 to rslt_info.num_attr; /* add each attr. to select list */ 550 call add_sel_item (mvar, i); 551 if ls_set.first_block 552 then if length (mvar) > 2 553 then if substr (mvar, 1, 3) = "V00" 554 then select_info.user_item.table_name (select_info.n_user_items) = rel_name; 555 else select_info.user_item.table_name (select_info.n_user_items) = mvar; 556 else select_info.user_item.table_name (select_info.n_user_items) = mvar; 557 else; 558 end; 559 560 end add_sel_tuple; 561 562 add_sel_item: 563 proc (mvar, attr_ind); 564 565 /* Procedure to add a select list item given the attr index into rslt_info, 566* and the tuple variable name */ 567 568 dcl (attr_ind, assn_type) fixed bin; 569 dcl assn_len fixed bin (35); 570 dcl assn_ptr ptr init (null); 571 dcl mvar char (32) var; 572 573 ls_block.nselects = ls_block.nselects + 1; 574 ls_block.sel_items (ls_block.nselects) = /* add to select list */ 575 mvar || "." || before (rslt_info.attr.attr_name (attr_ind), " "); 576 577 if ^ls_set.first_block then /* if not first block, check compat. */ 578 if ls_set.domain_info.name (ls_block.nselects) 579 ^= rslt_info.attr.domain_name (attr_ind) then 580 call 581 linus_lila_error (lcb_ptr, lsh_ptr, 582 linus_error_$union_compat, token); 583 else ; /* if is OK do nothing */ 584 else do; /* is first block, add domain info */ 585 call 586 linus_assign_data (rslt_info.attr.descriptor (attr_ind), assn_type, 587 assn_len); 588 call 589 linus_lila_alloc_lit (lcb_ptr, 590 addr (rslt_info.attr.descriptor (attr_ind)), assn_ptr, bit_len_sink) 591 ; 592 if assn_ptr = null then /* couldnt alloc. */ 593 call 594 linus_lila_error (lcb_ptr, lsh_ptr, 595 linus_error_$cant_alloc_lit, token); 596 ls_set.nselects = ls_set.nselects + 1; 597 ls_set.domain_info.name (ls_set.nselects) = 598 rslt_info.attr.domain_name (attr_ind); 599 ls_set.domain_info.bit_length (ls_set.nselects) = 600 rslt_info.attr.attr_length (attr_ind); 601 ls_set.domain_info.desc (ls_set.nselects) = 602 rslt_info.attr.descriptor (attr_ind); 603 ls_set.domain_info.assn_ptr (ls_set.nselects) = assn_ptr; 604 ls_set.domain_info.assn_type (ls_set.nselects) = assn_type; 605 ls_set.domain_info.assn_len (ls_set.nselects) = assn_len; 606 if select_info.n_mrds_items >= select_info.nmi_alloc 607 /* if could overflow */ 608 | select_info.n_user_items >= select_info.nui_alloc then 609 call 610 linus_lila_error (lcb_ptr, lsh_ptr, 611 linus_error_$select_list_ovfl, ""); 612 select_info.n_mrds_items = select_info.n_mrds_items + 1; 613 select_info.n_user_items = select_info.n_user_items + 1; 614 /* fill in select info item data */ 615 select_info.mrds_item.arg_ptr (select_info.n_mrds_items) = assn_ptr; 616 select_info.mrds_item.bit_len (select_info.n_mrds_items) = 617 rslt_info.attr.attr_length (attr_ind); 618 select_info.mrds_item.desc (select_info.n_mrds_items) = 619 rslt_info.attr.descriptor (attr_ind); 620 select_info.mrds_item.assn_type (select_info.n_mrds_items) = assn_type; 621 select_info.mrds_item.assn_len (select_info.n_mrds_items) = assn_len; 622 select_info.user_item.name (select_info.n_user_items) = 623 before (rslt_info.attr.attr_name (attr_ind), " "); 624 625 select_info.user_item.item_type (select_info.n_user_items) = MRDS; 626 select_info.user_item.item_ptr (select_info.n_user_items) = 627 addr (select_info.mrds_item (select_info.n_mrds_items)); 628 end; /* if first block */ 629 630 end add_sel_item; 631 632 end linus_lila_select; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.9 linus_lila_select.pl1 >special_ldd>install>MR12.0-1106>linus_lila_select.pl1 87 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 89 2 03/27/82 0434.5 linus_ef_data.incl.pl1 >ldd>include>linus_ef_data.incl.pl1 91 3 11/23/82 1327.2 linus_ls_header.incl.pl1 >ldd>include>linus_ls_header.incl.pl1 3-4 4 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 93 5 03/27/82 0434.5 linus_ls_set.incl.pl1 >ldd>include>linus_ls_set.incl.pl1 5-4 6 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 95 7 03/27/82 0434.5 linus_ls_block.incl.pl1 >ldd>include>linus_ls_block.incl.pl1 7-4 8 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 97 9 03/27/82 0434.5 linus_mrds_block.incl.pl1 >ldd>include>linus_mrds_block.incl.pl1 99 10 03/27/82 0434.5 linus_rel_array.incl.pl1 >ldd>include>linus_rel_array.incl.pl1 101 11 09/16/83 1338.0 linus_select_info.incl.pl1 >ldd>include>linus_select_info.incl.pl1 103 12 03/27/82 0434.5 linus_temp_tab_names.incl.pl1 >ldd>include>linus_temp_tab_names.incl.pl1 105 13 03/27/82 0434.5 linus_token_data.incl.pl1 >ldd>include>linus_token_data.incl.pl1 107 14 10/14/83 1609.0 mrds_rslt_info.incl.pl1 >ldd>include>mrds_rslt_info.incl.pl1 109 15 10/14/83 1608.2 mdbm_att_desc.incl.pl1 >ldd>include>mdbm_att_desc.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. FROM constant fixed bin(17,0) initial dcl 13-13 ref 224 MINUS constant fixed bin(17,0) initial dcl 13-13 ref 241 MRDS constant fixed bin(17,0) initial dcl 134 ref 625 NULL constant fixed bin(17,0) initial dcl 13-13 ref 176 291 308 319 328 341 351 354 514 SEL_EXPR constant fixed bin(17,0) initial dcl 135 ref 442 STAR constant fixed bin(17,0) initial dcl 13-13 ref 241 addr builtin function dcl 158 ref 238 238 405 405 588 588 626 arg_ptr based pointer array level 3 dcl 11-5 set ref 422* 615* assn_len 15 000164 automatic fixed bin(35,0) level 2 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 451 assn_len based fixed bin(35,0) array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 605* assn_len 000101 automatic fixed bin(35,0) dcl 569 in procedure "add_sel_item" set ref 585* 605 621 assn_len 45 000164 automatic fixed bin(35,0) array level 3 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 426 assn_len based fixed bin(35,0) array level 3 in structure "select_info" dcl 11-5 in procedure "linus_lila_select" set ref 426* 621* assn_ptr 000102 automatic pointer initial dcl 570 in procedure "add_sel_item" set ref 570* 588* 592 603 615 assn_ptr based pointer array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 603* assn_ptr 12 000164 automatic pointer level 2 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 447 assn_ptr 42 000164 automatic pointer array level 3 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 422 assn_type 44 000164 automatic fixed bin(17,0) array level 3 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 424 assn_type 000100 automatic fixed bin(17,0) dcl 568 in procedure "add_sel_item" set ref 585* 604 620 assn_type 14 000164 automatic fixed bin(17,0) level 2 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 449 assn_type based fixed bin(17,0) array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 604* assn_type based fixed bin(17,0) array level 3 in structure "select_info" dcl 11-5 in procedure "linus_lila_select" set ref 424* 620* attr 4 based structure array level 2 dcl 14-7 attr_ind parameter fixed bin(17,0) dcl 568 ref 562 574 577 585 588 588 597 599 601 616 618 622 attr_length 24 based fixed bin(18,0) array level 3 dcl 14-7 ref 599 616 attr_name 4 based char(32) array level 3 dcl 14-7 ref 506 574 622 back_ptr 2 based pointer level 2 dcl 7-3 ref 173 before builtin function dcl 158 ref 574 622 bit_len based fixed bin(35,0) array level 3 dcl 11-5 set ref 418* 616* bit_len_sink 000125 automatic fixed bin(35,0) dcl 111 set ref 588* bit_length 10 000164 automatic fixed bin(35,0) level 2 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 445 bit_length 40 000164 automatic fixed bin(35,0) array level 3 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 418 bit_length based fixed bin(35,0) array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 599* code parameter fixed bin(35,0) dcl 111 set ref 18 365* cur_pos 13 based fixed bin(35,0) level 2 dcl 3-3 set ref 177* 237 356* cur_ptr 6 based pointer level 2 dcl 3-3 ref 172 desc based bit(36) array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 601* desc 41 000164 automatic bit(36) array level 3 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 420 desc based bit(36) array level 3 in structure "select_info" dcl 11-5 in procedure "linus_lila_select" set ref 420* 618* desc 11 000164 automatic bit(36) level 2 in structure "expr_data" dcl 132 in procedure "linus_lila_select" set ref 443 descriptor 26 based bit(36) array level 3 dcl 14-7 set ref 585* 588 588 601 618 dflt_ritem based fixed bin(17,0) level 2 dcl 7-3 ref 286 domain_info based structure array level 2 dcl 5-3 domain_name 14 based char(32) array level 3 dcl 14-7 ref 577 597 done 000134 automatic bit(1) unaligned dcl 117 set ref 188* 190 228* dup_flag based bit(1) level 2 packed unaligned dcl 5-3 set ref 339* ef_data based structure level 1 dcl 2-3 ef_ptr 000164 automatic pointer level 2 dcl 132 set ref 453 end_flag 000131 automatic bit(1) unaligned dcl 117 set ref 186* 194 249* 261* 289* 309* expr_data 000164 automatic structure level 1 dcl 132 set ref 405 405 first_block based bit(1) level 2 packed unaligned dcl 5-3 ref 395 498 551 577 fwd_ptr based pointer level 2 dcl 9-3 set ref 472* i 000206 automatic fixed bin(17,0) dcl 375 in procedure "process_expr" set ref 411* 418 420 422 424 426* 435* 435* 438 i 000220 automatic fixed bin(17,0) dcl 464 in procedure "process_col_spec" set ref 488* 488* 491 495 497 498 506* 506* 510* i 000100 automatic fixed bin(17,0) dcl 524 in procedure "add_sel_tuple" set ref 529* 529* 532 533 536 538 549* 550* icode 000124 automatic fixed bin(35,0) dcl 111 set ref 177* 180 180* 238* 241 356* 359 359* 379* 382 382* 405* 408 408* inner parameter bit(1) unaligned dcl 117 ref 18 271 299 377 468 inv_setop based bit(1) level 2 packed unaligned dcl 5-3 set ref 399* item_flag 000133 automatic bit(1) unaligned dcl 117 set ref 186* 231 252 266 294 331* 391* 479* item_ptr based pointer array level 3 dcl 11-5 set ref 453* 626* item_type based fixed bin(17,0) array level 3 dcl 11-5 set ref 442* 625* j 000101 automatic fixed bin(17,0) dcl 524 in procedure "add_sel_tuple" set ref 540* 540* 543 j 000221 automatic fixed bin(17,0) dcl 464 in procedure "process_col_spec" set ref 502* 502* 505 key based fixed bin(17,0) level 2 in structure "token_data" packed unaligned dcl 13-3 in procedure "linus_lila_select" set ref 176 192 224 291* 308* 319* 328* 341* 351* 354 514* key 000136 automatic fixed bin(17,0) level 2 in structure "tok_data" packed unaligned dcl 130 in procedure "linus_lila_select" set ref 241 241 lb_flag 000127 automatic bit(1) unaligned dcl 117 set ref 184* 314 320* 329* lcb based structure level 1 dcl 1-53 lcb_ptr parameter pointer dcl 1-121 set ref 18 169 170 177* 180* 194* 224* 231* 238* 252* 266* 271* 275* 279* 294* 299* 314* 323* 334* 344* 356* 359* 379* 382* 384* 390* 395* 405* 408* 412* 429* 471 478* 483* 544* 577* 588* 592* 606* leaf_ptr based pointer array level 2 dcl 7-3 set ref 388* 474* length builtin function dcl 158 in procedure "linus_lila_select" ref 470 551 length 23 based fixed bin(35,0) level 2 in structure "token_data" dcl 13-3 in procedure "linus_lila_select" ref 180 180 194 194 224 224 231 231 252 252 266 266 271 271 275 275 279 279 294 294 299 299 306 306 314 314 323 323 334 334 344 344 359 359 395 395 470 473 483 483 506 544 544 577 577 592 592 lila_area_ptr 62 based pointer level 2 dcl 1-53 ref 471 linus_assign_data 000050 constant entry external dcl 160 ref 585 linus_data_$max_expr_items 000014 external static fixed bin(35,0) dcl 137 ref 132 linus_data_$max_pred_stack_size 000010 external static fixed bin(35,0) dcl 137 ref 286 388 474 linus_data_$max_range_items 000012 external static fixed bin(35,0) dcl 137 ref 286 388 474 483 544 573 573 574 574 577 linus_data_$max_set_stack_size 000016 external static fixed bin(35,0) dcl 137 ref 174 339 349 395 399 498 551 577 577 597 599 601 603 604 605 linus_error_$bad_inner_select 000020 external static fixed bin(35,0) dcl 137 set ref 271* 299* linus_error_$cant_alloc_lit 000022 external static fixed bin(35,0) dcl 137 set ref 592* linus_error_$const_expr_fn 000024 external static fixed bin(35,0) dcl 137 set ref 384* linus_error_$expr_not_alld 000026 external static fixed bin(35,0) dcl 137 set ref 395* linus_error_$incomplete_select 000030 external static fixed bin(35,0) dcl 137 set ref 194* linus_error_$no_table 000032 external static fixed bin(35,0) dcl 137 set ref 275* linus_error_$select_list_ovfl 000034 external static fixed bin(35,0) dcl 137 set ref 412* 429* 483* 544* 606* linus_error_$select_syntax 000036 external static fixed bin(35,0) dcl 137 set ref 224* 231* 252* 266* 294* 314* 323* 334* 344* linus_error_$too_many_tables 000040 external static fixed bin(35,0) dcl 137 set ref 279* linus_error_$union_compat 000042 external static fixed bin(35,0) dcl 137 set ref 577* linus_lila_alloc_lit 000052 constant entry external dcl 161 ref 588 linus_lila_build_expr_str 000056 constant entry external dcl 163 ref 379 linus_lila_build_expr_tab 000054 constant entry external dcl 162 ref 405 linus_lila_error 000060 constant entry external dcl 165 ref 180 194 224 231 252 266 271 275 279 294 299 314 323 334 344 359 382 384 395 408 412 429 483 544 577 592 606 linus_lila_get_token 000062 constant entry external dcl 166 ref 177 238 356 linus_lila_term$stack_term 000064 constant entry external dcl 167 ref 390 478 linus_rel_array based structure level 1 unaligned dcl 10-10 linus_rel_array_ptr 000110 automatic pointer dcl 10-16 set ref 170* 502 502 505 540 540 543 ls_block based structure level 1 dcl 7-3 ls_header based structure level 1 dcl 3-3 ls_set based structure level 1 dcl 5-3 lsb_ptr 000102 automatic pointer dcl 7-32 set ref 172* 173 275 279 286 286 388 435 435 438 474 483 488 488 491 495 497 498 529 529 532 533 536 538 544 573 573 574 574 577 lsh_ptr parameter pointer dcl 3-15 set ref 18 172 177* 177 180* 194* 224* 231* 237 238* 252* 266* 271* 275* 279* 294* 299* 314* 323* 334* 344* 356* 356 359* 379* 382* 384* 390* 395* 405* 408* 412* 429* 478* 483* 544* 577* 592* 606* lss_ptr 000100 automatic pointer dcl 5-33 set ref 173* 174 339 349 395 399 498 551 577 577 596 596 597 597 599 599 601 601 603 603 604 604 605 605 mblk_ptr 000106 automatic pointer dcl 9-16 set ref 171* 379* 388 389* 471* 472 473 474 475* mrds_block based structure level 1 dcl 9-3 set ref 471 mrds_data_$max_select_items 000044 external static fixed bin(35,0) dcl 137 ref 174 286 388 474 483 544 mrds_data_$max_token_size 000046 external static fixed bin(35,0) dcl 137 ref 286 388 474 574 574 574 mrds_item based structure array level 2 dcl 11-5 set ref 626 mrds_items 20 000164 automatic structure array level 2 dcl 132 mrds_string based varying char level 2 dcl 9-3 set ref 473* mrds_var 23 based varying char(32) array level 3 dcl 7-3 ref 435 488 532 ms_len based fixed bin(35,0) level 2 dcl 9-3 set ref 471* 473 ms_len_init 000105 automatic fixed bin(35,0) dcl 9-15 set ref 470* 471 471 must_free 0(18) based bit(1) level 2 packed unaligned dcl 13-3 ref 476 mvar 1 based varying char(32) level 2 in structure "token_data" dcl 13-3 in procedure "linus_lila_select" set ref 470 473 488 510* mvar 000112 automatic varying char(32) dcl 527 in procedure "add_sel_tuple" set ref 532* 550* 551 551 555 556 mvar parameter varying char(32) dcl 571 in procedure "add_sel_item" ref 562 574 n_mrds_items 16 based fixed bin(17,0) level 2 dcl 11-5 set ref 412 417* 417 418 420 422 424 426 606 612* 612 615 616 618 620 621 626 n_user_items 17 based fixed bin(17,0) level 2 dcl 11-5 set ref 429 434* 434 438 438 442 443 445 447 449 451 453 498 551 555 556 606 613* 613 622 625 626 name based char(32) array level 3 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 577 597* name based varying char(32) array level 3 in structure "select_info" dcl 11-5 in procedure "linus_lila_select" set ref 438* 622* nmi_alloc 13 based fixed bin(17,0) level 2 dcl 11-5 ref 412 438 438 442 443 445 447 449 451 453 498 551 555 556 606 622 625 626 nmrds_items 16 000164 automatic fixed bin(17,0) level 2 dcl 132 set ref 402* 411 nritems 11 based fixed bin(17,0) level 2 dcl 7-3 ref 275 279 435 488 529 nselects 6 based fixed bin(17,0) level 2 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" set ref 596* 596 597 599 601 603 604 605 nselects based fixed bin(17,0) level 2 in structure "ls_block" dcl 7-3 in procedure "linus_lila_select" set ref 483 544 573* 573 574 577 nsv_alloc 12 based fixed bin(17,0) level 2 dcl 11-5 ref 418 420 422 424 426 438 438 442 443 445 447 449 451 453 498 551 555 556 615 616 618 620 621 622 625 626 626 nui_alloc 14 based fixed bin(17,0) level 2 dcl 11-5 ref 429 606 null builtin function dcl 158 ref 171 389 472 475 476 511 570 592 num_attr based fixed bin(17,0) level 2 dcl 14-7 ref 506 544 549 num_of_rels based fixed bin(17,0) level 2 dcl 10-10 ref 502 540 num_of_rels_init 000112 automatic fixed bin(17,0) initial dcl 10-18 set ref 10-18* nval_args 4 based fixed bin(17,0) level 2 dcl 9-3 set ref 471* 471 473 473 nval_args_init 000104 automatic fixed bin(17,0) dcl 9-14 set ref 469* 471 471 range_items 12 based structure array level 2 dcl 7-3 rdesc_ptr 000122 automatic pointer dcl 15-8 set ref 171* rel_array_ptr 66 based pointer level 2 dcl 1-53 ref 170 rel_index 45 based fixed bin(35,0) array level 3 dcl 7-3 ref 495 536 rel_name 000102 automatic char(32) initial unaligned dcl 525 in procedure "add_sel_tuple" set ref 525* 536* 538* 540 551 rel_name 000222 automatic char(32) initial unaligned dcl 466 in procedure "process_col_spec" set ref 466* 495* 497* 502 rel_name 34 based varying char(32) array level 3 in structure "ls_block" dcl 7-3 in procedure "linus_lila_select" ref 491 497 533 538 rel_name 2 based char(32) array level 3 in structure "linus_rel_array" packed unaligned dcl 10-10 in procedure "linus_lila_select" ref 502 540 rels 2 based structure array level 2 unaligned dcl 10-10 rslt_assn_len based fixed bin(35,0) array level 3 dcl 11-5 set ref 451* rslt_assn_ptr based pointer array level 3 dcl 11-5 set ref 447* rslt_assn_type based fixed bin(17,0) array level 3 dcl 11-5 set ref 449* rslt_bit_len based fixed bin(35,0) array level 3 dcl 11-5 set ref 445* rslt_desc based bit(36) array level 3 dcl 11-5 set ref 443* rslt_info based structure level 1 dcl 14-7 rslt_info_ptr 12 based pointer array level 3 dcl 10-10 ref 505 543 rslt_ptr 000120 automatic pointer dcl 14-32 set ref 171* 505* 506 506 511* 543* 544 549 574 577 585 588 588 597 599 601 616 618 622 se_flags 0(01) based structure level 2 packed unaligned dcl 11-5 sel_flag 000130 automatic bit(1) unaligned dcl 117 set ref 184* 323 329* sel_items based varying char array level 2 dcl 7-3 set ref 574* select_info based structure level 1 dcl 11-5 si_ptr based pointer level 2 in structure "ls_set" dcl 5-3 in procedure "linus_lila_select" ref 174 si_ptr 000114 automatic pointer dcl 11-49 in procedure "linus_lila_select" set ref 174* 284 304 400 400 400 412 412 417 417 418 418 420 420 422 422 424 424 426 426 429 429 434 434 438 438 438 438 442 442 443 443 445 445 447 447 449 449 451 451 453 453 493 493 498 498 534 534 551 551 555 555 556 556 606 606 606 606 612 612 613 613 615 615 616 616 618 618 620 620 621 621 622 622 625 625 626 626 626 626 substr builtin function dcl 158 ref 551 t_ptr 24 based pointer level 2 dcl 13-3 set ref 180 194 224 231 252 266 271 275 279 294 299 306 314 323 334 344 359 395 473 476* 483 506 544 577 592 table_name based varying char(32) array level 3 dcl 11-5 set ref 438* 498* 551* 555* 556* td_ptr parameter pointer dcl 13-49 set ref 18 176 177* 180 180 180 192 194 194 194 224 224 224 224 231 231 231 252 252 252 266 266 266 271 271 271 275 275 275 279 279 279 291 294 294 294 299 299 299 306 306 306 308 314 314 314 319 323 323 323 328 334 334 334 341 344 344 344 351 354 356* 359 359 359 379* 395 395 395 405* 470 470 473 473 473 476 476 483 483 483 488 506 506 510 514 544 544 544 577 577 577 592 592 592 temp_cur_pos 000126 automatic fixed bin(35,0) dcl 111 set ref 237* 238* temp_tab_names based char(32) array unaligned dcl 12-3 ref 495 536 tok_data 000136 automatic structure level 1 dcl 130 set ref 238 238 token based char unaligned dcl 128 set ref 180* 194* 224* 231* 252* 266* 271* 275* 279* 294* 299* 306* 314* 323* 334* 344* 359* 395* 473 483* 506 544* 577* 592* token_data based structure level 1 dcl 13-3 ttn_ptr 000116 automatic pointer dcl 12-5 in procedure "linus_lila_select" set ref 169* 495 536 ttn_ptr 26 based pointer level 2 in structure "lcb" dcl 1-53 in procedure "linus_lila_select" ref 169 tup_var 12 based varying char(32) array level 3 in structure "ls_block" dcl 7-3 in procedure "linus_lila_select" ref 286 438 498 529 tup_var parameter char unaligned dcl 526 in procedure "add_sel_tuple" ref 518 529 un_dup_flag 000132 automatic bit(1) unaligned dcl 117 set ref 186* 248* 262* 290* 310* 331* 334 340* 344 350* unique_flag based bit(1) level 2 packed unaligned dcl 5-3 set ref 349* user_item based structure array level 2 dcl 11-5 val_del 0(03) based bit(1) level 3 packed unaligned dcl 11-5 set ref 400* 493* 534* val_dtt 0(02) based bit(1) level 3 packed unaligned dcl 11-5 set ref 400* val_mod 0(04) based bit(1) level 3 packed unaligned dcl 11-5 set ref 284* 304* 400* 493* 534* var 000176 automatic char(32) unaligned dcl 374 set ref 378* 379* 384 var_name 000164 automatic char(32) level 2 dcl 132 set ref 403* 435 work_area based area dcl 127 ref 471 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AND internal static fixed bin(17,0) initial dcl 13-13 COL_SPEC internal static fixed bin(17,0) initial dcl 13-13 COMMA internal static fixed bin(17,0) initial dcl 13-13 CONST internal static fixed bin(17,0) initial dcl 13-13 DIFFER internal static fixed bin(17,0) initial dcl 13-13 DIV internal static fixed bin(17,0) initial dcl 13-13 DUP internal static fixed bin(17,0) initial dcl 13-13 EQ internal static fixed bin(17,0) initial dcl 13-13 GE internal static fixed bin(17,0) initial dcl 13-13 GT internal static fixed bin(17,0) initial dcl 13-13 INTER internal static fixed bin(17,0) initial dcl 13-13 LB internal static fixed bin(17,0) initial dcl 13-13 LE internal static fixed bin(17,0) initial dcl 13-13 LINUS_VAR internal static fixed bin(17,0) initial dcl 13-13 LP internal static fixed bin(17,0) initial dcl 13-13 LT internal static fixed bin(17,0) initial dcl 13-13 NE internal static fixed bin(17,0) initial dcl 13-13 NOT internal static fixed bin(17,0) initial dcl 13-13 OR internal static fixed bin(17,0) initial dcl 13-13 PLUS internal static fixed bin(17,0) initial dcl 13-13 RB internal static fixed bin(17,0) initial dcl 13-13 ROW_DES internal static fixed bin(17,0) initial dcl 13-13 ROW_TAB_PAIR internal static fixed bin(17,0) initial dcl 13-13 RP internal static fixed bin(17,0) initial dcl 13-13 SCAL_FN internal static fixed bin(17,0) initial dcl 13-13 SELECT internal static fixed bin(17,0) initial dcl 13-13 SET_FN internal static fixed bin(17,0) initial dcl 13-13 TAB_NAME internal static fixed bin(17,0) initial dcl 13-13 UNION internal static fixed bin(17,0) initial dcl 13-13 UNIQUE internal static fixed bin(17,0) initial dcl 13-13 WHERE internal static fixed bin(17,0) initial dcl 13-13 att_desc based structure level 1 dcl 15-3 ed_ptr automatic pointer dcl 2-22 fixed builtin function dcl 158 mrds_data_$max_temp_rels external static fixed bin(35,0) dcl 137 nmi_init automatic fixed bin(17,0) dcl 11-48 nsv_init automatic fixed bin(17,0) dcl 11-48 nui_init automatic fixed bin(17,0) dcl 11-48 num_atts_init automatic fixed bin(17,0) dcl 15-7 rel builtin function dcl 158 rslt_alloc automatic fixed bin(17,0) dcl 14-34 sys_info$max_seg_size external static fixed bin(35,0) dcl 137 NAMES DECLARED BY EXPLICIT CONTEXT. add_sel_item 003342 constant entry internal dcl 562 ref 510 550 add_sel_tuple 002771 constant entry internal dcl 518 ref 286 306 exit 001410 constant label dcl 366 linus_lila_select 000065 constant entry external dcl 18 next 001323 constant label dcl 354 ref 229 250 264 292 312 321 332 342 352 process_col_spec 002317 constant entry internal dcl 459 ref 245 246 process_expr 001411 constant entry internal dcl 369 ref 241 259 token_proc 000000 constant label array(0:34) dcl 194 ref 192 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 4620 4706 4255 4630 Length 5512 4255 66 570 343 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_lila_select 252 external procedure is an external procedure. process_expr internal procedure shares stack frame of external procedure linus_lila_select. process_col_spec internal procedure shares stack frame of external procedure linus_lila_select. add_sel_tuple 106 internal procedure is called during a stack extension. add_sel_item 94 internal procedure is called by several nonquick procedures. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME add_sel_item 000100 assn_type add_sel_item 000101 assn_len add_sel_item 000102 assn_ptr add_sel_item add_sel_tuple 000100 i add_sel_tuple 000101 j add_sel_tuple 000102 rel_name add_sel_tuple 000112 mvar add_sel_tuple linus_lila_select 000100 lss_ptr linus_lila_select 000102 lsb_ptr linus_lila_select 000104 nval_args_init linus_lila_select 000105 ms_len_init linus_lila_select 000106 mblk_ptr linus_lila_select 000110 linus_rel_array_ptr linus_lila_select 000112 num_of_rels_init linus_lila_select 000114 si_ptr linus_lila_select 000116 ttn_ptr linus_lila_select 000120 rslt_ptr linus_lila_select 000122 rdesc_ptr linus_lila_select 000124 icode linus_lila_select 000125 bit_len_sink linus_lila_select 000126 temp_cur_pos linus_lila_select 000127 lb_flag linus_lila_select 000130 sel_flag linus_lila_select 000131 end_flag linus_lila_select 000132 un_dup_flag linus_lila_select 000133 item_flag linus_lila_select 000134 done linus_lila_select 000136 tok_data linus_lila_select 000164 expr_data linus_lila_select 000176 var process_expr 000206 i process_expr 000220 i process_col_spec 000221 j process_col_spec 000222 rel_name process_col_spec THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other return alloc_auto_adj mpfx2 shorten_stack ext_entry int_entry int_entry_desc alloc_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. linus_assign_data linus_lila_alloc_lit linus_lila_build_expr_str linus_lila_build_expr_tab linus_lila_error linus_lila_get_token linus_lila_term$stack_term THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. linus_data_$max_expr_items linus_data_$max_pred_stack_size linus_data_$max_range_items linus_data_$max_set_stack_size linus_error_$bad_inner_select linus_error_$cant_alloc_lit linus_error_$const_expr_fn linus_error_$expr_not_alld linus_error_$incomplete_select linus_error_$no_table linus_error_$select_list_ovfl linus_error_$select_syntax linus_error_$too_many_tables linus_error_$union_compat mrds_data_$max_select_items mrds_data_$max_token_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 18 000060 10 18 000072 132 000073 169 000104 170 000111 171 000113 172 000117 173 000123 174 000125 176 000164 177 000170 180 000206 184 000242 186 000245 188 000250 190 000251 192 000254 194 000260 224 000312 228 000350 229 000352 231 000353 237 000405 238 000412 241 000433 245 000446 246 000450 248 000451 249 000452 250 000454 252 000455 259 000507 261 000510 262 000512 264 000513 266 000514 271 000546 275 000605 279 000643 284 000701 286 000703 289 000745 290 000750 291 000751 292 000756 294 000757 299 001011 304 001050 306 001052 308 001070 309 001075 310 001077 312 001100 314 001101 319 001133 320 001140 321 001141 323 001142 328 001174 329 001201 331 001203 332 001206 334 001207 339 001241 340 001246 341 001247 342 001254 344 001255 349 001307 350 001314 351 001315 352 001322 354 001323 356 001330 359 001351 363 001405 365 001406 366 001410 369 001411 377 001412 378 001420 379 001423 382 001455 384 001504 388 001535 389 001565 390 001567 391 001600 392 001601 395 001602 399 001640 400 001645 402 001653 403 001655 405 001660 408 001701 411 001730 412 001741 417 001772 418 001774 420 002014 422 002021 424 002025 426 002033 428 002045 429 002047 434 002100 435 002102 437 002124 438 002126 442 002207 443 002216 445 002240 447 002246 449 002253 451 002261 453 002303 457 002316 459 002317 466 002320 468 002323 469 002331 470 002332 471 002341 472 002367 473 002371 474 002437 475 002467 476 002471 478 002500 479 002510 480 002511 483 002512 488 002551 490 002575 491 002577 493 002611 495 002615 496 002625 497 002626 498 002632 502 002672 504 002710 505 002712 506 002717 508 002743 510 002745 511 002760 514 002762 516 002767 518 002770 525 003004 529 003007 531 003033 532 003036 533 003051 534 003060 536 003064 537 003073 538 003074 540 003100 542 003117 543 003121 544 003130 549 003172 550 003203 551 003214 555 003261 556 003310 558 003336 560 003340 562 003341 570 003347 573 003351 574 003356 577 003457 583 003565 585 003566 588 003602 592 003627 596 003666 597 003671 599 003740 601 003751 603 004005 604 004012 605 004020 606 004031 612 004064 613 004067 615 004070 616 004102 618 004115 620 004122 621 004130 622 004142 625 004211 626 004220 630 004250 ----------------------------------------------------------- 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