1 ^L
 2 link_symbol:        procedure(previous,s);
 3 
 4 declare   (previous,s) pointer parameter;
 5 declare   q pointer;
 6 declare   level fixed binary(15);
 7 
 8           level = s->symbol.level;
 9           if level > 1
10                     then do;
11                               s->symbol.member,s->symbol.internal = "1"b;
12                               if previous = null then call declare_parse$abort(16,null);
13                          else if previous->symbol.level = 0 then call declare_parse$abort(16,null);
14                          else if level > previous->symbol.level
15                                         then do;
16                                                   s->symbol.father = previous;
17                                                   previous->symbol.son = s;
18                                                   previous->symbol.structure = "1"b;
19                                              end;
20                                         else do;
21                                                   /* loop is executed at least once */
22                                                   do while(level <= previous->symbol.level);
23                                                   q = previous; /* remember possible brother */
24                                                   previous = previous->symbol.father;
25                                                   end;
26                                                   q->symbol.brother = s;
27                                                   s->symbol.father = previous;
28                                              end;
29                          end;
30                     else if level = 1 then s->symbol.structure = "1"b;
31           previous = s;
32 end link_symbol;