1
2 next_arg: proc (i, p, l)returns (bit (1));
3
4
5
6
7
8 dcl i fixed bin(24)parm;
9 dcl l fixed bin(24)parm;
10 dcl p ptr parm;
11 if i = 1 then do;
12 rp = addr (arg_string);
13 rl = length (arg_string);
14 end;
15 if rl<1 then return ("1"b);
16 k = index (rs, ",");
17 p = rp;
18 if k = 0 then do;
19 l = rl;
20 rl = 0;
21 rp = null ();
22 return ("0"b);
23 end;
24
25
26 l = k-1;
27 rp = addr (rs2 (k+1));
28 rl = rl - k;
29 return ("0"b);
30
31 dcl addr builtin;
32 dcl index builtin;
33 dcl k fixed bin(24);
34 dcl length builtin;
35 dcl rl fixed bin(24)static int;
36 dcl rp ptr static int;
37 dcl rs char(rl)unal based(rp);
38 dcl rs2 (k+1)char(1)unal based(rp);
39 end next_arg;
40
41