+
+# my $sth = $dbh->prepare("select tagfield,tagsubfield from auth_subfield_structure where tagfield=? and authtypecode=? and tab >= 0");
+# $sth->execute($auth_tag_to_report,$authtypecode);
+# warn " field $auth_tag_to_report exists";
+# while (my ($tag,$subfield) = $sth->fetchrow){
+# if ($record->field($tag)->subfields($subfield)) {
+# # warn "tag :".$tag." subfield: $subfield value : ".$record->field($tag)->subfield($subfield);
+# push @tags, $tag.$subfield;
+# # warn "'".$tag.$subfield."' value :". $record->field($tag)->subfield($subfield);
+# push @and_or, "and";
+# push @excluding, "";
+# push @operator, "contains";
+# push @value, $record->field($tag)->subfield($subfield);
+# }
+# }