[librecat-dev] Processing multiple 700 (author) fields to PICA

Patrick Hochstenbach Patrick.Hochstenbach at UGent.be
Wed Dec 6 12:54:58 CET 2023


Hello,

Please find in the attachment an updates fix for your case. I don't know the PICA format so you need to edit the Fix a bit to place the output of the 700 field in the correct PICA field.


The trick is that for MARC we have a special `do marc_each()` binding, that loops over every field in the MARC record and execute all the fixes in the `do` block.


With `marc_has` you can select to execute only the fixes if a marc field matches some tag. The rest is a bit copied from your code and making sure with force_new of pica_add that for every 700 field a new pica field gets created.


BR

Patrick

________________________________
From: librecat-dev-bounces at lists.uni-bielefeld.de <librecat-dev-bounces at lists.uni-bielefeld.de> on behalf of Siebert, Dr. Martina <Martina.Siebert at sbb.spk-berlin.de>
Sent: 05 December 2023 18:46
To: librecat-dev at lists.uni-bielefeld.de <librecat-dev at lists.uni-bielefeld.de>
Subject: [librecat-dev] Processing multiple 700 (author) fields to PICA


Hello,



I have done “do list(path:…, var:…)” processing of multiple authors to PICA+ in the past. That time from XML and JSON sources. Now I got completely stuck when trying to do this from MARC 700 when keeping the family, personal name info :(

I attach an example record with a first (100) and two second authors/contributors (700).



For the first 100 author I did this (maybe more complicated than necessary ;)

set_array(pica)



## get authors etc.

# author

marc_map(100a,author1)

split_field(author1,', ')



# put authors etc.

pica_add(author1.1,028A$d,record:'pica')

pica_add(author1.0,028A$a,record:'pica')



move_field(pica,record)



I have tried the same with 700 guys but got lost in do list() loops and how to get the data in the correct order (first $d personal name then $a family name) into PICA+ 028C.



Can anyone help?

Best,

Martina



______________________________________________

Dr. Martina Siebert



Ostasienabteilung | CrossAsia

Staatsbibliothek zu Berlin – Preußischer Kulturbesitz



martina.siebert at sbb.spk-berlin.de<mailto:martina.siebert at sbb.spk-berlin.de>

www.staatsbibliothek-berlin.de<http://www.staatsbibliothek-berlin.de/>



Im Rahmen der E-Mail-Kommunikation werden gegebenenfalls personenbezogene Daten verarbeitet.
Unsere Hinweise zum Datenschutz finden Sie hier: http://sbb.berlin/datenschutz


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20231206/9ca30d32/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myfix.fix.txt
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20231206/9ca30d32/attachment.txt>


More information about the librecat-dev mailing list