+#marc('952','a',
+# 'HPM'
+#);
+#marc('952','b',
+# 'HPM'
+#);
+#marc('952','e',
+# rec('991','a')
+#);
+#marc('952','o',
+# rec('990')
+#);
+#marc('952','t',
+# rec('991','b')
+#);
+
+my $copynumber = rec('991','b') ;
+my $callnumber = rec('990') ;
+
+my $location = rec('992');
+my $location_konv = {
+ 'ZB, Min. odjel i Geol. odjel, HPrM' => 'ZB',
+ 'ZB, Min. odjel i Geol. odjel, HPM' => 'ZB',
+ 'ZB i Min. odjel, HPrM' => 'ZB',
+ 'ZB i Min. odjel, HPM' => 'ZB',
+ 'ZB i Geol. odjel, HPrM' => 'ZB',
+ 'ZB i Geol. odjel, HPM' => 'ZB',
+ 'ZB, HRrM' => 'ZB',
+ 'ZB, HrPM' => 'ZB',
+ 'ZB, HPrM' => 'ZB',
+ 'ZB, HPM' => 'ZB',
+ 'ZB, Geol. odjel i Min. odjel, HPM' => 'ZB',
+ 'Min. odjel i ZB, HPM' => 'ZB',
+ 'Min. odjel i Geol. odjel, HPrM' => 'MP',
+ 'Min. odjel i Geol. odjel, HPM' => 'MP',
+ 'Min. odjel, HPrM' => 'MP',
+ 'Min. odjel, HPM' => 'MP',
+ 'Min. odjel' => 'MP',
+ 'Institut Makarska' => 'ZB',
+ 'Geol. odjel i ZB, HPM' => 'ZB',
+ 'Geol. odjel i Min. odjel, HPM' => 'MP',
+ 'Geol. odjel, HPrM' => 'GP',
+ 'Geol. odjel, HPM' => 'GP'
+};
+
+#dump ( $itype );
+
+if ( rec('991','a') ) {
+ foreach my $repeat ( rec_array('991') ) {
+ my $sf_a = $repeat->{a} || die "991 doesn't have a ", dump( $repeat );
+ if ( my $sf_b = $repeat->{b} ) {
+ $sf_b || die "no inv";
+ marc_compose('952',
+ 'a' => 'HPM',
+ 'b' => 'HPM',
+ 'c' => $location_konv->{$location},
+ 't' => $sf_b,
+ 'o' => $callnumber,
+ 'y' => $itype
+ );
+ }
+ }
+}