1 & iod_admin.ec - extended IO daemon operator commands.
  2 &
  3 & This exec_com is invoked when the IO daemon operator sends the command line,
  4 &         x function {arg1 arg2 ...}
  5 &
  6 &    where in this exec_com,
  7 &         &1 = function
  8 &         &2 = arg1
  9 &         &3 = arg2
 10 &         etc
 11 &
 12 & Notes:
 13 &
 14 &      1. This iod_admin.ec is only a template and may be modified by system administrative personel
 15 &         to fit the site's needs.
 16 &
 17 &      2. It has been primarily designed for use by remote job entry station operators and is not applicable to
 18 &         single device daemons (usually driving on-site peripherals).
 19 &
 20 &      3. Refer to the help facility portion of this exec_com for information on the syntax of the commands.
 21 &
 22 &      4. This exec_com assumes that printer and punch minor device names in the iod_tables start with "prt" and "pun", respectively.
 23 &
 24 & **************************************************************************************************************
 25 &
 26 & Set up default values for remote driver's use of the iod_admin.ec
 27 &
 28 &command_line off
 29 &if [exists segment [pd]>value_seg] &then &else cr [pd]>value_seg; value$set_seg [pd]>value_seg
 30 &
 31 &goto &1_command
 32 
 33 
 34 
 35 
 36 & **************************************************************************************************************
 37 &
 38 &         This group of entries is the absentee facility.
 39 &         It allows the operator to manipulate or list only those absentee jobs that were sent in by his station.
 40 &
 41 &label car_command
 42 &
 43 & For: canceling absentee requests
 44 &
 45 &if [exists argument &2] &then &goto car_command_arg
 46 value$set help_arg car
 47 &goto help_car_command
 48 
 49 &label car_command_arg
 50 car -sender [iod_val station_id] &f2
 51 &quit
 52 
 53 & --------------------------------------------------
 54 &label lar_command
 55 &
 56 & For: list absentee requests
 57 &
 58 &if [exists argument &2] &then &goto lar_anything
 59 lar -sender [iod_val station_id] -a -psn
 60 &quit
 61 
 62 & --------------------
 63 &label lar_anything
 64 &
 65 lar -sender [iod_val station_id] &f2
 66 &quit
 67 
 68 & --------------------------------------------------
 69 &label mar_command
 70 &
 71 & For: move absentee requests
 72 &
 73 &if [exists argument &2] &then &goto mar_command_arg
 74 value$set help_arg mar
 75 &goto help_mar_command
 76 
 77 &label mar_command_arg
 78 mar -sender [iod_val station_id] &f2
 79 &quit
 80 
 81 
 82 
 83 
 84 & **************************************************************************************************************
 85 &
 86 &         This group of entries is the daemon facility.
 87 &         It allows the operator to list any queue of any request type known to the system.
 88 &         The operator may only delete or move those requests that are in the queues currently being processed
 89 &           by his driver.
 90 &
 91 &label cdr_command
 92 &
 93 & For: canceling daemon requests
 94 &
 95 &if [exists argument &2] &then &goto cdr_args
 96 value$set help_arg cdr
 97 &goto help_cdr_command
 98 
 99 & --------------------
100 &label cdr_args
101 &
102 &if [nequal [index &2 %] 0] &then &else &goto %char_error
103 &if [nequal [index %channel%device%pun_rqt%request_type%rqt_string%station_id% %&2%] 0] &then &else &goto bad_arg
104 &if [equal [iod_val &2] undefined!] &then &goto cdr_by_rqt
105 cdr -rqt [iod_val &2] &f3
106 &quit
107 
108 & --------------------
109 &label cdr_by_rqt
110 &
111 &if [nequal [index %[translate [string [iod_val rqt_string]] % " "]% %&2%] 0] &then &goto rqt_error
112 cdr -rqt &2 &f3
113 &quit
114 
115 
116 & --------------------------------------------------
117 &label ldr_command
118 &
119 & For: list daemon requests
120 &
121 &if [exists argument &2] &then &goto ldr_specific
122 do "ioa_ ""Requests in ^a are;"" &(1); ldr -rqt &(1) -a -admin -psn" ([iod_val rqt_string])
123 &quit
124 
125 & --------------------
126 &label ldr_specific
127 &
128 &if [nequal [index &2 %] 0] &then &else &goto %char_error
129 &if [nequal [index %channel%device%pun_rqt%request_type%rqt_string%station_id% %&2%] 0] &then &else &goto bad_arg
130 &if [equal [iod_val &2] undefined!] &then &goto ldr_any_rqt
131 ioa_ "Requests in ^a are;" [iod_val &2]
132 ldr -rqt [iod_val &2] -a -admin -psn &f3
133 &quit
134 
135 & --------------------
136 &label ldr_any_rqt
137 &
138 &print Requests in &2 are;
139 ldr -rqt &2 -a -admin -psn &f3
140 &quit
141 
142 & --------------------------------------------------
143 &label mdr_command
144 &
145 & For: move daemon requests
146 &
147 &if [exists argument &2] &then &goto mdr_args
148 value$set help_arg mdr
149 &goto help_mdr_command
150 
151 & ----------
152 &label mdr_args
153 &
154 &if [nequal [index &2 %] 0] &then &else &goto %char_error
155 &if [nequal [index %channel%device%pun_rqt%request_type%rqt_string%station_id% %&2%] 0] &then &else &goto bad_arg
156 &if [equal [iod_val &2] undefined!] &then &goto mdr_by_rqt
157 mdr -rqt [iod_val &2] &f3
158 &quit
159 
160 & --------------------
161 &label mdr_by_rqt
162 &if [nequal [index %[translate [string [iod_val rqt_string]] % " "]% %&2%] 0] &then &goto rqt_error
163 mdr -rqt &2 &f3
164 &quit
165 
166 
167 
168 
169 & **************************************************************************************************************
170 &
171 &         This group of entries is the help facility.
172 &         It explains the syntax of each entry in the iod_admin.ec in a language similar to
173 &           that used in the standard driver help command.
174 &
175 &label help_command
176 &
177 &if [exists argument &2] &then &else &goto help_no_arg
178 value$set help_arg &2
179 &goto help_&2_command
180 
181 & --------------------
182 &label help_no_arg
183 &
184 &print The "x" command allows the daemon operator to perform site defined functions.
185 &print The format is,
186 &print ^-x function {arg1 arg2 ...}
187 value$set help_arg all
188 &if [query "Do you want help for a specific x function? "] &then &else &goto help_all_command
189 value$set help_arg [response "Which x function? " -non_null]
190 &print
191 &if [equal [value help_arg] am] &then &goto help_am_command
192 &if [equal [value help_arg] car] &then &goto help_car_command
193 &if [equal [value help_arg] cdr] &then &goto help_cdr_command
194 &if [equal [value help_arg] help] &then &goto help_help_command
195 &if [equal [value help_arg] lar] &then &goto help_lar_command
196 &if [equal [value help_arg] ldr] &then &goto help_ldr_command
197 &if [equal [value help_arg] mar] &then &goto help_mar_command
198 &if [equal [value help_arg] mdr] &then &goto help_mdr_command
199 &if [equal [value help_arg] pm] &then &goto help_pm_command
200 &if [equal [value help_arg] sm] &then &goto help_sm_command
201 ioa_ "Unknown command, ^a" [value help_arg]
202 &quit
203 
204 
205 & --------------------
206 &label help_all_command
207 &print
208 
209 & --------------------
210 &label help_am_command
211 &
212 &print x am
213 &print ^2xNeeds no arguments.  Sets up driver's mailbox to receive messages and defers them.
214 &if [equal [value help_arg] all] &then &else &quit
215 
216 
217 & --------------------
218 &label help_car_command
219 &
220 &print x car <car arguments>
221 &print ^2xControl argument supplied; -sender <station ident>
222 &if [equal [value help_arg] all] &then &else &quit
223 
224 
225 & --------------------
226 &label help_cdr_command
227 &
228 &print cdr (<minor device name> | <current driver request type>) <cdr arguments>
229 &print ^2xControl argument supplied; -rqt <current print/punch request type>
230 &if [equal [value help_arg] all] &then &else &quit
231 
232 
233 & --------------------
234 &label help_help_command
235 &
236 &print x help {all | am | car | cdr | help | lar | ldr | mar | mdr | pm | sm}
237 &if [equal [value help_arg] all] &then &else &quit
238 
239 
240 & --------------------
241 &label help_lar_command
242 &
243 &print x lar {<lar arguments>}
244 &print ^2xControl argument supplied: -sender <station ident>
245 &print ^2xIf no arguments given, control arguments supplied: -a -psn -sender <station ident>
246 &if [equal [value help_arg] all] &then &else &quit
247 
248 & --------------------
249 &label help_ldr_command
250 &
251 &print x ldr {(<minor device name> | <any request type>) {<ldr arguments>}}
252 &print ^2xControl arguments supplied are; -a -admin -psn -rqt <current print/punch request type or specified rqt>
253 &print ^2xIf no arguments are given, current request queues for all minor devices are listed.
254 &if [equal [value help_arg] all] &then &else &quit
255 
256 & --------------------
257 &label help_mar_command
258 &
259 &print x mar <mar arguments>
260 &print ^2xControl argument supplied; -sender <station ident>
261 &if [equal [value help_arg] all] &then &else &quit
262 
263 & --------------------
264 &label help_mdr_command
265 &
266 &print x mdr (<minor device name> | <current driver request type>) <mdr arguments>
267 &print ^2xControl argument supplied; -rqt <current print/punch request type>
268 &if [equal [value help_arg] all] &then &else &quit
269 
270 & --------------------
271 &label help_pm_command
272 &
273 &print x pm
274 &print ^2xNeeds no arguments.  Prints messages or mail in driver's mailbox.
275 &if [equal [value help_arg] all] &then &else &quit
276 
277 & --------------------
278 &label help_sm_command
279 &
280 &print x sm <to station ident> {<message>}
281 &print ^2xSends messages to another RJE station.
282 &print ^2xMessages can be sent conversationally by not supplying the message on the "x sm" command line.
283 &quit
284 
285 
286 
287 
288 & **************************************************************************************************************
289 &
290 &         This group of entries is the message facility.
291 &         It allows the operator to initialize his mailbox for receiving messages, printing messages
292 &           and sending messages to other daemon drivers (either with one line messages or conversationally).
293 &
294 &label am_command
295 &
296 & For:  accepting messages
297 &
298 am -pn >ddd>io_msg_dir>[iod_val station_id] -print -call iod_driver_message
299 
300 &  The following two command lines may be removed or disabled if this exec_com is used exclusively by L6/G115 remotes.
301 &
302 dm -pn >ddd>io_msg_dir>[iod_val station_id]
303 &print Use the "x pm" command line to receive messages.
304 &quit
305 
306 & --------------------------------------------------------------------------------
307 &label pm_command
308 &
309 & For: print messages
310 &
311 pm -pn >ddd>io_msg_dir>[iod_val station_id] -call iod_driver_message
312 &quit
313 
314 & --------------------------------------------------
315 &label sm_command
316 &
317 & For: send message supplied or conversationally
318 &
319 &if [exists argument &2] &then &else &goto missing_arg
320 &if [exists argument &3] &then &else &goto sm_conversational
321 sm -pn >ddd>io_msg_dir>&2 from driver [iod_val station_id]: &f3
322 &quit
323 
324 & --------------------
325 &label sm_conversational
326 &print Enter your station_id as the first message line.
327 &print Send a line containing only a "." to exit send message.
328 sm -pn >ddd>io_msg_dir>&2
329 &quit
330 
331 
332 
333 
334 & --------------------------------------------------
335 &label rqt_error
336 &
337 & The operator made a mistake specifying a request type.
338 &
339 ioa_ "x: Request type argument of ""&1"" function must be ""^a""^( or ""^a""^)." [iod_val rqt_string]
340 &quit
341 
342 & --------------------------------------------------------------------------------
343 &label %char_error
344 &
345 &print x: Illegal character "%" found in argument.
346 
347 & --------------------------------------------------------------------------------
348 &label bad_arg
349 &
350 &print x: **** Illegal or missing argument to "x &1" command. ****
351 &quit
352 
353 & --------------------------------------------------------------------------------
354 &label missing_arg
355 &
356 & Notify the operator that an expected argument is missing.
357 &
358 &print <<<< Missing argument to "x &1" command. >>>>
359 &quit
360 
361 & --------------------------------------------------------------------------------
362 & An unknown function has been given to the x command.
363 &
364 &label &1_command
365 &
366 &print >>>> Undefined "x" command function, &1 <<<<
367 &quit
368 
369 & --------------------------------------------------------------------------------