[Koha] 852's $h and $i into one 952's $o

Christopher Curry ccurry at amphilsoc.org
Sat Oct 30 03:07:20 NZDT 2010


Maxwell,

Sorry you're having trouble.  I don't see anything wrong with your data 
(except that the 952 fields are filed strangely; I don't know if that 
matters).  I suggest you ask the very helpful members of the MARCEDIT-L 
list as well (if you haven't already):

http://listserv.gmu.edu/cgi-bin/wa?SUBED1=MARCEDIT-L&A=1

Good luck!

Cheers,

Christopher Curry
Assistant Technical Librarian / Assistant IT Officer

American Philosophical Society
105 South Fifth Street
Philadelphia, PA 19106-3386
Tel. (215) 599-4299

ccurry at amphilsoc.org <mailto:ccurry at amphilsoc.org>

Main Library number: (215)440-3400
APS website: http://www.amphilsoc.org



On 10/29/2010 06:40 AM, SlyzertVoltrond wrote:
> Christopher,
>
> Sorry for posting mutiple copies of the same mail, I was trying to
> make contents of the mail appear in the Koha mailing list, but to no
> avail. I don't know why it came up emtpy
>
> 1. Yes, I did. I also tried executing the strings without $b
> string(and excluding $6 too, I guess), temporarily moving other
> subfields in 952 to another field, only left $h and $i in there. And
> just incase, I also create a new $o subfield. But the result is still
> the same, it doesn't replace anything.
>
> Here are sample records(with other 952 subfields moved to another field):
>
> =LDR  00569nam  22001691a 4500
> =020  \\$a9839340042$c0.00
> =952  \\$h344.59501$iMAI
> =082  \\$bMAI
> =100  \\$aMAIMUNAH Aminuddin
> =245  \\$aAn A - Z of Malaysian employment law$h[Text]
> =260  \\$aKuala Lumpur$bMcGraw-Hill Book$c1999
> =300  \\$a215p.
> =600  \\$aIndustrial Relations - Laws and Legislations - Malaysia
> =600  \\$aMalaysian labour law and legislation
> =600  \\$aTrade-unions - law and legislation - Malaysia
> =850  \\$aMaybank Library
> =852  \\$aMalayan Banking Berhad$t0$g49.90$pG11184MACL$cLibrary (General)
>
> =LDR  00441nam  22001571a 4500
> =020  \\$c0.00
> =952  \\$h657.33$iBER
> =082  \\$bBER
> =100  \\$aBERNSTEIN, Leopold A.
> =245  \\$aThe analysis of financial statements$h[Text]
> =260  \\$aIllinois$bRichard D. Irwin$c1978
> =300  \\$a311p.
> =600  \\$aFinancial Statements
> =600  \\$aManagerial Accounting
> =850  \\$aMaybank Library
> =852  \\$aMalayan Banking Berhad$t0$g54.14$pG02149MACL$cLibrary (General)
>
> Does anyone have any idea what I did wrong?
>
> regards,
> Maxwell
>
> On Fri, Oct 29, 2010 at 12:43 AM, Christopher Curry
> <ccurry at amphilsoc.org>  wrote:
>    
>> Maxwell,
>>
>> I'm no RegExpert, but perhaps this will help:
>>
>> 1. Did you first move your 852$h data and 852$i to 952$h&  952$i,
>> respectively?  This RegEx string is looking for data in 952$h&  952$i.  BTW,
>> you'll probably want to exclude the "(\$.*\$b[A-Za-z0-9.]*)" string unless
>> you have $b data to parse.  When I used this find&  replace string I'm
>> pretty sure I moved the $h&  $i to 952 first, combined them into $o using
>> the RegEx, then moved other subfields from 852 that I wanted to map to 952
>> subfields.  If you have other subfields in 952 when you run this, it can gum
>> up the works (I think).
>>
>> 2. This find&  replace operation is looking for any data in $h&  $i and
>> concatenating it in a new $o.
>>
>> $1            $2     $3                    $4    $5                    $6
>> (=952  ..) (\$h) ([A-Za-z0-9.]*) (\$i) ([A-Za-z0-9.]*)
>> (\$.*\$b[A-Za-z0-9.]*)
>>
>> The find string breaks down the 952 field into its constituent parts.
>>
>> $1$o$3 $5$6
>>
>> The replace string reassembles the parts in the order you specify, so the
>> result should be:
>>
>> =952  ..$o[The result of "([A-Za-z0-9.]*)" after (\$h), $3] [The result of
>> "([A-Za-z0-9.]*)" after (\$i), $5][The result of "(\$.*\$b[A-Za-z0-9.]*)",
>> $6]
>>
>> Hope this helps.
>>
>> Cheers,
>>
>> Christopher Curry
>> Assistant Technical Librarian / Assistant IT Officer
>>
>> American Philosophical Society
>> 105 South Fifth Street
>> Philadelphia, PA 19106-3386
>> Tel. (215) 599-4299
>>
>> ccurry at amphilsoc.org
>>
>> Main Library number: (215)440-3400
>> APS website: http://www.amphilsoc.org
>>
>> On 10/28/2010 12:19 PM, SlyzertVoltrond wrote:
>>
>>  From the link you gave me:
>> "Next enter the following string into the 'Find what' box:
>> (=952  ..)(\$h)([A-Za-z0-9.]*)(\$i)([A-Za-z0-9.]*)(\$.*\$b[A-Za-z0-9.]*)
>> This will take the data from the $h field (and the data could be
>> capital letters, lower case letters, numbers and decimals) and the
>> data from the $i string (and the data could be capital letters, lower
>> case letters, numbers and decimals) and $b is the last subfield in the
>> 952 field.
>> TIP: This regular expression may need to be changed depending on the
>> type of data you have in your system. Libraries that use the LC
>> classification system in particular may need to tweak the "replace"
>> command to find and move cutters.
>> And enter the following string into the 'Replace with' box:
>> $1$o$3 $5$6
>> This string is saying stay in the same field number as in parenthesis
>> #1, move the data from parenthesis #3 of the 'Find what' string next
>> to $o, add a space, take the data from parenthesis #5 and move it to
>> $o as well, then check to the end of the field and leave all the other
>> subfield data alone."
>> -------------------------------------------------------------------------------------------------------------------------------------------------
>> I tried doing the above on my records, but I think it only finds the
>> data and doesn't replace anything, because it said "0 modifications
>> were made." and took a few seconds to finish. Any ideas on how to move
>> the subfields?
>> regards,
>> Maxwell
>> 2010/10/28 Christopher Curry<ccurry at amphilsoc.org>:
>>
>>
>> Maxwell,
>> Have a look at the "Swapping Fields" section of this page in the old
>> koha.org manual.  It explains how to accomplish this by first moving the 852
>> $h&  $i to 952 $h&  $i, then using a RegEx to combine the two fields into
>> one $o subfield:
>> http://koha.org/documentation/tutorial/using-marcedit/tutorial-all-pages
>> I couldn't find this information in the official docs:
>> http://koha-community.org/documentation/3-2-manual/?ch=a12459
>> Cheers,
>> Christopher Curry
>> Assistant Technical Librarian / Assistant IT Officer
>> American Philosophical Society
>> 105 South Fifth Street
>> Philadelphia, PA 19106-3386
>> Tel. (215) 599-4299
>> ccurry at amphilsoc.org
>> Main Library number: (215)440-3400
>> APS website: http://www.amphilsoc.org
>> On 10/28/2010 10:13 AM, SlyzertVoltrond wrote:
>> How do I use MarcEdit's Find/Replace function to move 852's $h and $i
>> subfield data into one 952's $o subfield? If I try to swap $h of 852
>> to $o of 952 and then do that again for $i of 852 field, I end up
>> creating two $o entries in the 952 field, which I don't think is
>> allowed for call number subfield. Also, I don't have the slightest
>> idea how to use regular expressions to achieve the said task, so I
>> would appreciate it if someone could write it for me, or at least
>> guide me how to write one.
>> regards,
>> Maxwell
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> http://lists.katipo.co.nz/mailman/listinfo/koha
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> http://lists.katipo.co.nz/mailman/listinfo/koha
>>
>>      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20101029/79f96be5/attachment.htm 


More information about the Koha mailing list