1 02/05/82  lila
  2 
  3 Syntax:  lila {-control_args}
  4 
  5 
  6 Function: invokes the LINUS Language (LILA) editor and translator.
  7 
  8 
  9 Control arguments:
 10 -build {START} {INCREMENT}
 11    invokes LILA build mode, an automatic numbering mode, in the current
 12    LILA text file.  START determines  the  first  line  number  of  the
 13    inserted  text.   INCREMENT, when added to the previous line number,
 14    yields the next automatic line number.  A value for  START  must  be
 15    given  if  an  INCREMENT  is  to  be given.  START and INCREMENT are
 16    positive integers ranging from 1 to 9999.  Build mode is  exited  by
 17    entering a line consisting of a period (".").  (DEFAULT INCREMENT is
 18    10.  DEFAULT START is the current last line_number  plus  INCREMENT.
 19    For  an empty lila file, the DEFAULT for both START and INCREMENT is
 20    10.) NOTE: Build mode overwrites any existing text line which has  a
 21    line  number  equal to any automatically generated line number.  For
 22    example: if the file contains lines  10,  20,  30,  ...,  the  LINUS
 23    request "lila -build 15 15" would insert line 15, overwrite line 30,
 24    insert line 45, etc.
 25 
 26 
 27 -new
 28    deletes all lines from the LILA text file which remain from previous
 29    invocations of LILA in the current LINUS session.   (DEFAULT  is  to
 30    keep the old text lines).
 31 
 32 
 33 Requests:
 34 build {START} {INCREMENT}
 35    invokes build mode in the current lila text file. (See -build above.)
 36 invoke macro_path {optional_args}, i macro_path {optional_args}
 37    causes the requests in the designated segment to be executed.
 38 line_number
 39    deletes a LILA source line.
 40 line_number source_line
 41    adds or replaces a LILA source line.
 42 list, ls
 43    prints the current LILA source file.
 44 list_requests, lr
 45    prints a brief summary of available lila requests.
 46 
 47 
 48 new
 49    deletes all text from current lila text file.
 50 proc
 51    processes the current LILA source file to form the specification of
 52    the database subset which is to be accessed by subsequent LINUS
 53    database requests.
 54 quit, q
 55    exits from LILA and returns to LINUS request level.
 56 save macro_path, sv macro_path
 57    stores the current LILA file as a LINUS macro in the designated
 58    segment with a ".linus" suffix.
 59 
 60 
 61 Notes:
 62 
 63 If  you  type  a dot (.), LINUS will let you know whether you are
 64 at LINUS request level or in the LILA  editor.   If  you  type  a
 65 question mark (?), LILA will print a brief list of requests.
 66 
 67 Multics command lines maybe executed by typing "execute command_line"
 68 or "e command_line" or "..command_line".
 69 
 70 Refer to the LINUS manual (Order No. AZ49) for complete information on
 71 LILA syntax.  The following sections provide examples of typical LILA
 72 expressions.
 73 
 74 
 75 Examples:
 76 The following examples reference a database containing the following
 77 five tables:
 78 
 79 emp (name, empno, dept, mgr, sal, comm)
 80 sales (dept, item, vol)
 81 supply (supplier, item, vol)
 82 loc (dept, floor)
 83 class (item, type)
 84 
 85 The LILA syntax basically consists of constructing various
 86 combinations of SELECT-FROM-WHERE blocks as shown.
 87 
 88 select dept
 89 from emp
 90 
 91 ***
 92 
 93 
 94 Further examples:
 95 select *
 96 from emp
 97 where sal > 8000
 98 
 99 ***
100 
101 select name sal
102 from emp
103 where dept = "Toy" & mgr = 1423
104 
105 ***
106 
107 select name
108 from emp
109 where dept = "Admin" | sal + comm > 10000
110 
111 
112 More examples:
113 select item
114 from sales
115 where dept = {select dept
116               from loc
117               where floor = 2}
118 
119 ***
120 
121 avg {select sal
122      from emp
123      where dept = "Shoe"}
124 
125 
126 Even more examples:
127 select name
128 from emp
129 where sal > max {select sal
130                  from emp
131                  where dept = "Shoe"}
132 
133 ***
134 
135 select name sal - avg {select sal
136                        from emp
137                        where dept = "Shoe"}
138 from emp
139 where dept = "Shoe"
140 
141 
142 Still more examples:
143 select item
144 from supply
145 where supplier = "Levi"
146 inter
147 select item
148 from sales
149 where dept = "Men"
150 
151 ***
152 
153 sum {select vol
154      from sales
155      where item = {select item
156                    from class
157                    where type = "A"}
158      & dept = {select dept
159                from loc
160                where floor = 2}}
161 
162 
163 Final examples:
164 sum {select vol
165      from sales
166      where sales.item = class.item & class.type = "A"
167           & sales.dept = loc.dept & loc.floor = 2}
168 
169 ***
170 
171 select x.name y.name
172 from x:emp y:emp
173 where x.mgr = y.emp_no & x.sal > y.sal