1 /* procedure to compare a group_id with another one possibly containing missing components */ 2 3 match_group_id_: proc (original, match) returns (bit(1)); 4 dcl (original, match) char(32) aligned; 5 dcl group_id_part_ entry (char(32) aligned, fixed bin) returns (char(*)); 6 dcl i fixed bin; 7 8 do i = 1 to 3; /* go through each part */ 9 if group_id_part_ (match,i) ^= "" /* if matching group_id component is not null */ 10 then if group_id_part_ (match,i) ^= group_id_part_ (original,i) then return("0"b); /* and it's not equal to original group_id component then return false */ 11 end; /* else keep looping */ 12 13 return ("1"b); /* all components equal */ 14 end;