1
2
3
4
5
6
7
8
9
10 lss_login_responder_:
11 proc;
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 dcl (addr, divide, null, index) builtin;
30
31 dcl
32 user_info_ entry (char (*), char (*)),
33 user_info_$usage_data ext entry (fixed bin),
34 user_info_$attributes entry (char (300) var),
35 user_info_$homedir entry (char (*)),
36 nproc fixed bin,
37 hcs_$status_minf entry (char (*), char (*), fixed bin (1), fixed bin (2), fixed bin (24), fixed bin (35)),
38 hcs_$initiate_count entry (char (*), char (*), char (*), fixed bin (24), fixed bin (1), ptr, fixed bin),
39 hcs_$initiate_search_rules entry (ptr, fixed bin),
40 iox_$put_chars entry (ptr, ptr, fixed bin (21), fixed bin),
41 iox_$user_output external static ptr,
42 hcs_$terminate_noname ext entry (ptr, fixed bin),
43 motd_len fixed bin (24),
44 motd_ptr ptr,
45 hcs_$initiate entry (char (*), char (*), char (*), fixed bin (2), fixed bin (1), ptr, fixed bin),
46 start_governor_ ext entry (fixed bin (17), fixed bin (17)),
47 error_table_$segknown ext fixed bin (17),
48 ioa_ entry options (variable),
49 logout entry options (variable),
50 command_processor_$setup_lss entry (ptr),
51 listen_ entry (char (*) var),
52 condition_ entry (char (*), entry),
53 standard_default_handler_ ext entry,
54
55 attr char (300) var,
56 person char (22),
57 project char (9),
58 hdir char (64),
59 standard bit (1) aligned,
60
61 1 info based (command_table) aligned,
62 2 ratio fixed bin (17),
63 2 interval_length fixed bin (17),
64
65 1 search_rules aligned int static,
66 2 num fixed bin init (5),
67 2 names (5) char (168) aligned
68 init ("initiated_segments", "referencing_dir",
69 ">system_library_standard", ">system_library_1",
70 ">system_library_unbundled"),
71
72 entry_type fixed bin (2),
73 bit_cnt fixed bin (24),
74 mcode fixed bin (35),
75 code fixed bin (17),
76 command_table ptr;
77
78
79
80 standard = "1"b;
81 go to common;
82
83
84
85
86 limited_command_system_:
87 entry;
88
89 standard = "0"b;
90
91
92
93
94
95 common:
96 call hcs_$initiate_search_rules (addr (search_rules), code);
97 if code ^= 0 then go to error;
98
99 call condition_ ("any_other", standard_default_handler_);
100
101
102
103 if ^standard then do;
104 call user_info_ (person, project);
105 call hcs_$initiate (">user_dir_dir>"|| project, "lss_command_list_", "", 0b, 0b,
106 command_table, code);
107 if code = 0 then go to got_ptr;
108 if code = error_table_$segknown then go to got_ptr;
109 end;
110
111
112
113 call hcs_$initiate (">system_library_standard", "lss_command_list_", "", 0b, 0b, command_table, code);
114
115 if code ^= 0 then
116 if code ^= error_table_$segknown then do;
117
118 error: call ioa_ ("The system is currently unavailable");
119 call logout ("-hold");
120 end;
121
122
123
124 got_ptr: call command_processor_$setup_lss (command_table);
125
126
127
128
129 call user_info_$attributes (attr);
130 call user_info_$usage_data (nproc);
131 if index (attr, "brief") = 0 then do;
132 if nproc = 1 then do;
133 call hcs_$initiate_count (">system_control_1", "message_of_the_day", "", motd_len, 1, motd_ptr, code);
134 if motd_ptr ^= null then do;
135 call iox_$put_chars (iox_$user_output, motd_ptr, divide (motd_len + 8, 9, 24, 0), code);
136 call hcs_$terminate_noname (motd_ptr, code);
137 end;
138 end;
139 end;
140
141
142
143 call start_governor_ (ratio, interval_length);
144
145
146
147
148
149 if index (attr, "nostartup") ^= 0 then go to no_init_com_line;
150 call user_info_$homedir (hdir);
151
152 call hcs_$status_minf (hdir, "start_up.ec", 1, entry_type, bit_cnt, mcode);
153 if nproc = 1 & mcode = 0 & entry_type = 1 then do;
154 call listen_ ("exec_com start_up login interactive");
155 go to all_set;
156 end;
157
158
159
160 no_init_com_line: call listen_ ("");
161
162 all_set: ;
163
164 end lss_login_responder_;