1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 mbuild_:
17 proc();
18
19 dcl ioa_ entry() options(variable);
20 dcl ioa_$general_rs_control_string entry(ptr, char(*), fixed bin, char(*), fixed bin(21), bit(1) aligned,
21 bit(1) aligned);
22 dcl ioa_$rsnnl entry() options(variable);
23 dcl cu_$arg_count_rel entry (fixed bin, ptr, fixed bin(35));
24 dcl cu_$arg_list_ptr entry (ptr);
25 dcl ssu_$evaluate_active_string entry (ptr, ptr, char(*), fixed bin, char(*) var, fixed bin(35));
26
27 dcl NL char(1) int static options(constant) init("
28 ");
29 dcl NLNL char(2) int static options(constant) init("
30
31 ");
32
33 dcl (addr, length, rtrim, substr) builtin;
34 %page;
35
36
37
38
39
40
41
42
43
44
45 banner:
46 entry (AsciP, Arequest_line, Adisplay) options(variable);
47
48 dcl Arequest_line char(*);
49 dcl Adisplay bit(1) aligned;
50
51 dcl bannerS bit(1) aligned init(F);
52
53 bannerS = T;
54 goto DO_BANNER;
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72 general_request:
73 entry (AsciP, Arequest_line, Adisplay, Aarg_listP, Astarting_argI);
74
75 dcl Aarg_listP ptr;
76 dcl Astarting_argI fixed bin;
77
78 dcl arg_count fixed bin;
79 dcl ignore_code fixed bin(35);
80 dcl gen_request_line char(500);
81 dcl request_line char(500),
82 request_lineL fixed bin(21);
83
84 call cu_$arg_count_rel (arg_count, Aarg_listP, ignore_code);
85 if arg_count < Astarting_argI then do;
86 request_line = Arequest_line;
87 request_lineL = length(rtrim(Arequest_line));
88 end;
89 else do;
90 arg_count = arg_count - (Astarting_argI-1);
91 call ioa_$rsnnl ("^a^^^d( ^^a^^)", gen_request_line, request_lineL, Arequest_line, arg_count);
92 call ioa_$general_rs_control_string (Aarg_listP, substr(gen_request_line,1,request_lineL), Astarting_argI,
93 request_line, request_lineL, F, T);
94 end;
95
96 go to DO_REQUEST;
97
98
99
100
101
102
103
104
105
106
107
108
109 request:
110 entry (AsciP, Arequest_line, Adisplay) options(variable);
111
112 dcl arg_listP ptr;
113 dcl argI fixed bin init(4);
114
115 DO_BANNER:
116 call cu_$arg_list_ptr (arg_listP);
117 call ioa_$general_rs_control_string (arg_listP, Arequest_line, argI, request_line, request_lineL, F, T);
118
119 DO_REQUEST:
120 if Adisplay then do;
121 if substr(request_line,1,length(NLNL)) = NLNL then
122 call ioa_ ("^/
123 else call ioa_ (substr(request_line,1,request_lineL));
124 end;
125
126 if ^bannerS then
127 call ssu_$execute_line (AsciP, addr(request_line), request_lineL, ignore_code);
128 return;
129 %page;
130
131
132
133
134
135
136
137
138
139
140
141 general_active_request:
142 entry (AsciP, Arequest_line, Astring_type, Aaf_ret, Aarg_listP, Astarting_argI);
143
144
145
146 dcl Astring_type fixed bin;
147 dcl Aaf_ret char(*) var;
148
149 dcl active_string char(request_lineL) based(addr(request_line));
150
151 call cu_$arg_count_rel (arg_count, Aarg_listP, ignore_code);
152 arg_count = arg_count - 1;
153 if arg_count < Astarting_argI then do;
154 request_line = Arequest_line;
155 request_lineL = length(rtrim(Arequest_line));
156 end;
157 else do;
158 arg_count = arg_count - (Astarting_argI-1);
159 call ioa_$rsnnl ("^a^^^d( ^^a^^)", gen_request_line, request_lineL, Arequest_line, arg_count);
160 call ioa_$general_rs_control_string (Aarg_listP, substr(gen_request_line,1,request_lineL), Astarting_argI,
161 request_line, request_lineL, F, F);
162 end;
163
164 call ssu_$evaluate_active_string (AsciP, null(), active_string, Astring_type, Aaf_ret, code);
165 if code ^= 0 then
166 call ssu_$print_message (AsciP, code, "^/ active string: ^[^;|^;||^][^a]^/ partial result: ^a",
167 Astring_type, active_string, Aaf_ret);
168 return;
169 %page;
170 %include ssu_subroutine_dcls_;
171 %page;
172 %include cp_active_string_types;
173 end mbuild_;