if ( rec('942','u') ) {

marc_clone();

if ( rec('999','c') =~ m/305996/ ) {
	marc_remove('520');
}

marc_remove('942');

marc('942','a',
	rec('942','a')
);
marc('942','b',
	rec('942','b')
);
marc('942','c',
	rec('942','c')
);
marc('942','d',
	rec('942','d')
);
marc('942','e',
	rec('942','e')
);
marc('942','f',
	rec('942','f')
);
marc('942','g',
	rec('942','g')
);
marc('942','h',
	rec('942','h')
);
marc('942','i',
	rec('942','i')
);
marc('942','j',
	rec('942','j')
);
marc('942','k',
	rec('942','k')
);
marc('942','l',
	rec('942','l')
);
marc('942','m',
	rec('942','m')
);
marc('942','n',
	rec('942','n')
);

#if ( rec('773','x') ) {
#	marc_repeatable_subfield('942','r',
#		lookup(
#			sub{ 
#				join_with(' ; ',
#					rec('baza'),
#					rec('coverage_policy'),
#					rec('coverage_status'),
#					join_with('-',
#						rec('coverage_start'),
#						rec('coverage_stop'),
#					),
#				);
#			},
#			'rbaze','rbaze',
#			sub{ rec('isn') },
#			sub{ rec('773','x') }
#		)
#	);
#}
#
#if ( rec('773','x') ) {
#	marc_repeatable_subfield('942','r',
#		lookup(
#			sub{ 
#				join_with(' ; ',
#					rec('baza'),
#					rec('coverage_policy'),
#					rec('coverage_status'),
#					join_with('-',
#						rec('coverage_start'),
#						rec('coverage_stop'),
#					),
#				);
#			},
#			'rbaze','rbaze',
#			sub{ rec('isn') },
#			sub{ rec('773','y') }
#		)
#	);
#}

if ( rec('773','x') ) {
	marc_repeatable_subfield('942','r',
		lookup(
			sub{ 
				join_with(' ; ',
					rec('B'),
					rec('N'),
					rec('O'),
					join_with('-',
						rec('P'),
						rec('R'),
					),
				)
			},
			'rbaze','rbaze',
			sub{ regex('s/-//g', rec('C')) },
			sub{ regex('s/-//g', rec('773','x')) }
		)
	);
}
if ( rec('773','x') ) {
	marc_repeatable_subfield('942','r',
		lookup(
			sub{ 
				join_with(' ; ',
					rec('B'),
					rec('N'),
					rec('O'),
					join_with('-',
						rec('P'),
						rec('R'),
					),
				)
			},
			'rbaze','rbaze',
			sub{ regex('s/-//g', rec('D')) },
			sub{ regex('s/-//g', rec('773','x')) }
		)
	);
}

#if ( rec('773','x') ) {
#	marc_repeatable_subfield('942','r',
#		lookup(
#			sub{ 
#				join_with(' ; ',
#					rec('B'),
#					rec('N'),
#					rec('O'),
#					join_with('-',
#						rec('P'),
#						rec('R'),
#					),
#				);
#			},
#			'rbaze','rbaze',
#			sub{ rec('C') },
#			sub{ rec('773','z') }
#		)
#	);
#}

marc('942','s',
	rec('942','s')
);
marc('942','t',
	rec('942','t')
);
marc('942','u',
	rec('942','u')
);
marc('942','v',
	rec('942','v')
);
marc('942','x',
	rec('942','x')
);
marc('942','y',
	rec('942','y')
);
marc('942','z',
	rec('942','z')
);

}
