1 &  ***********************************************************
 2 &  *                                                         *
 3 &  * Copyright, (C) Honeywell Information Systems Inc., 1982 *
 4 &  *                                                         *
 5 &  ***********************************************************
 6 &
 7 &         start_up.ec for Salvager.SysDaemon
 8 &         B. Greenberg 9/13/77
 9 &
10 do -absentee
11 &goto &1
12 &label login
13 &if [equal [user device_channel] s99] &then &goto mpabort
14 &command_line off
15 delete [user device_channel].fileout -brief
16 rdf
17 &if [equal [user device_channel] s0] &then date_deleter -wd 14 salv_output.* salv_online.*
18 io attach user_fileout vfile_ [user device_channel].fileout
19 io open user_fileout stream_output
20 iocall attach broadcast broadcast_ user_fileout
21 iocall attach broadcast broadcast_ user_i/o
22 syn_output user_fileout -ssw error_output
23 syn_output broadcast
24 &if [equal [user device_channel] s0] &then [io get_line user_input -nq]
25 &else do_subtree -slave
26 &
27 ro;ro -ssw error_output
28 io close user_fileout
29 io detach user_fileout
30 &if [equal [user device_channel] s0] &then &else logout
31 &
32 &         Collate the output
33 &
34 adjust_bit_count ([segs *.salvout] [segs *.fileout]) -ch
35 io attach salv_output vfile_ salv_output.[date].[time];io open salv_output so
36 io put_chars salv_output -sm ([segs *.salvout])
37 io close salv_output
38 io attach online_output vfile_ online_salvout.[date].[time];io open online_output so
39 io put_chars online_output -sm ([segs *.fileout])
40 io close online_output
41 
42 ec &ec_dir>&ec_name sortout [io attach_desc online_output -nq]
43 do "dprint -he ""SALV OUTPUT"" &(2)" [io attach_desc salv_output -nq]
44 do "dprint -he ""SALV ONLINE"" &(2)" [io attach_desc online_output -nq]
45 io detach online_output;io detach salv_output
46 delete *.salvout *.fileout -brief
47 logout
48 
49 &label mpabort
50 &command_line off
51 do_subtree$abort
52 logout
53 &label new_proc
54 &quit          & leave ec on new proc
55 &
56 &     Recursive entry to sort cumulated salv output, if not
57 &     msf. Called with spread attach description, as in..
58 &     ec start_up sortout vfile_ salv_output.09/14/77.12:53
59 &                 &1      &2     &3
60 &
61 &label sortout
62 &if [exists segment &3] &then &else &quit
63 &if [nequal [status &3 -bit_count] 0] &then &quit
64 &command_line off
65 &input_line off
66 &attach
67 qedx
68 r&3
69 1,$s/^$/^F/
70 $a
71 ^F
72 \f
73 w
74 q
75 &detach
76 dco -osw error_output sort_seg &3 -dm "^F" -replace
77 &quit