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

Siebert, Dr. Martina Martina.Siebert at sbb.spk-berlin.de
Wed Dec 6 15:04:32 CET 2023


Dear Patrick,

thanks a lot! And how elegantly and slim this works with "marc_has" and "reverse" :) I now also see that "reverse" is actually also on the Cheatsheet, but couldn't make the connection to my problem.
Cool, cool.
Best,
Martina

Von: Patrick Hochstenbach <Patrick.Hochstenbach at UGent.be>
Gesendet: Mittwoch, 6. Dezember 2023 12:55
An: Siebert, Dr. Martina <Martina.Siebert at sbb.spk-berlin.de>; librecat-dev at lists.uni-bielefeld.de
Betreff: Re: Processing multiple 700 (author) fields to PICA

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<mailto:librecat-dev-bounces at lists.uni-bielefeld.de> <librecat-dev-bounces at lists.uni-bielefeld.de<mailto:librecat-dev-bounces at lists.uni-bielefeld.de>> on behalf of Siebert, Dr. Martina <Martina.Siebert at sbb.spk-berlin.de<mailto:Martina.Siebert at sbb.spk-berlin.de>>
Sent: 05 December 2023 18:46
To: librecat-dev at lists.uni-bielefeld.de<mailto:librecat-dev at lists.uni-bielefeld.de> <librecat-dev at lists.uni-bielefeld.de<mailto: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


-------------- n?chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20231206/c6c4e64b/attachment.html>


More information about the librecat-dev mailing list