[librecat-dev] fix usecase

Patrick Hochstenbach Patrick.Hochstenbach at UGent.be
Thu Sep 1 14:46:16 CEST 2016

Hi Spiros

I didn’t find an exact answer using the Fix language..but a report that can get you started.

You need to create a CVS file like:



Yes..it requires a name and value column. It doesn’t matter what is in the value column as long as it isn’t empty.

This fix file will generate a report on all the MARC tags that have the $$c subfield matching the CVS file:


do marc_each()
  if exists(test.value)


Run it as:

$ catmandu convert MARC to YAML --fix test.fix < camel.usmarc 
_id: 'fol05872355 '
- name: '040'
  value: DLC
_id: 'fol05882032 '
- name: '040'
  value: DLC

You don’t get the indicators not are the fields sorted and counted. To be very honest, the report you would actually want would require programming Perl,PHP,Ruby,whatever by hand.


> On 30 Aug 2016, at 16:26, Spiros Antonio <spiros.antonio at gmail.com> wrote:
> Hello,
> say one has in a csv in a per row basis, some $a values.
> One has to lookup the csv, and for each value found there, check the whole mrc,
> and report for each tag found, what are the occurrences found, so in order to be able to see duplicates, all unique values. The important part is that this array(?) that will be stored,
> will have to take into account the whole tag, along with its indicators.
> 601  \\$a678676382683768$bmetadata$cotherdata
> 601  1\$a678676382683768$bmetadata$cotherdata, should be reported, as different values since the indicator differs.
> and this lookup, should be done in the whole mrc, not in a per record basis.
> Something like return all unique values of each tag found in the mrc, that has as $3 each value found in the csv file. How would you approach this with an example script?
> perhaps the inclusion of 001 would also be a good idea in the whole report.
> 001 ||| $3_value ||| tags_sorted_by_times_found
> Thank you
> _______________________________________________
> librecat-dev mailing list
> - send list mails to librecat-dev at lists.uni-bielefeld.de
> - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
> - project website: http://librecat.org/

Patrick Hochstenbach - digital architect
University Library Ghent
Sint-Hubertusstraat 8 - 9000 Ghent - Belgium
patrick.hochstenbach at ugent.be
+32 (0)9 264 7980

More information about the librecat-dev mailing list