1
2
3
4
5 pr_sw: proc (w, on_off, qin, qout);
6
7
8 dcl w char(1)parm;
9 dcl on_off char(3)parm;
10 dcl qin bit(36)parm;
11 dcl qout bit(36)parm;
12 call ioa_$nnl ("SWITCH WORD^1a: SET ^3a ", w, on_off);
13 c = 0;
14 do i = lbound (q1, 1) to hbound (q1, 1);
15 if q1 (i) then do;
16 c = c+1;
17 if c>1 then call ioa_$nnl (",");
18 call ioa_$nnl ("^i", i);
19 end;
20 end;
21 if c = 0 then call ioa_$nnl ("none");
22 call ioa_$nnl (" NOW ON ");
23 c = 0;
24 do i = lbound (q2, 1) to hbound (q2, 1);
25 if q2 (i) then do;
26 c = c+1;
27 if c>1 then call ioa_$nnl (",");
28 call ioa_$nnl ("^i", i);
29 end;
30 end;
31 if c = 0 then call ioa_$nnl ("none");
32 call ioa_$nnl ("^/");
33 return;
34
35 dcl ioa_$nnl entry options(variable);
36 dcl q1 (0:35)bit(1)unal based(addr(qin));
37 dcl q2 (0:35)bit(1)unal based(addr(qout));
38 dcl i fixed bin;
39 dcl c fixed bin;
40 end ;
41