Belated thanks for this, Geoffrey. Slammed at work & finally getting
caught up on a ridiculous email backlog.
I ended up doing something very similar.
Thanks again!
Cab Vinton
On Thu, Nov 17, 2016 at 4:34 PM, Geoffrey Skinner
<[log in to unmask]> wrote:
> Are your 952 number strings strictly sequential, or are there gaps? If the former, you could
> 1. Save your records as a MARC mnemonic text file
> 2. Open the file in a text editor that can do regex
> 3. break out your number with tabs
> 4. throw it in a spreadsheet
> 5. shift your number column by one
> 6. convert it back to MARC
>
> I have done this sort of operation before and it will only work safely with a PURELY sequential set. Otherwise you're simply going to really mess up a lot of records.
>
> When I do this sort of operation, I do the following regex find & replace in my text editor:
> 1. \r\n\= ==> %\= (puts each record in a separate string)
> 2. ^\= ==> %\= (or just manually change the first line of the file
> 3. (HR PTR )(\d+) ==> \t$1\t$2\t
> The results of these operations can be pasted into a spreadsheet and manipulated as needed. As a failsafe, I would typically copy the column to be shifted so that I can easily recover if there is a problem (and will remember to delete one or the other column at the end). After making the change, I copy the changed records from my spreadsheet back into my text editor and reverse the steps above; at the end, the steps are reversed to bring it back to a MARC mnemonic file.
>
> That said, the scripting route is likely safer.
>
> Geoffrey
> ----------------------
> Geoffrey Skinner, Cataloging and Metadata Supervising Librarian
> Sonoma County Library
> [log in to unmask]
>
> Geoffrey
>
>
> -----Original Message-----
> From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Cab Vinton
> Sent: Thursday, November 17, 2016 6:08 AM
> To: [log in to unmask]
> Subject: Re: [MARCEDIT-L] Strings & mathematical operators
>
> Thanks, Terry & Jim.
>
> COM scripting's definitely above my pay grade :-)
>
> Luckily we're only dealing w/ a few hundred almost identical items, so I think the easiest route will be to export to text/ CSV & dealing w/ the changes in Excel. Big fan of Text to Columns & the string concatenation function :-)
>
> Thanks again,
>
> Cab Vinton
>
> ________________________________________________________________________
>
> This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
>
> ________________________________________________________________________
>
> This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
________________________________________________________________________
This message comes to you via MARCEDIT-L, a Listserv(R) list for technical and instructional support in MarcEdit. If you wish to communicate directly with the list owners, write to [log in to unmask] To unsubscribe, send a message "SIGNOFF MARCEDIT-L" to [log in to unmask]
|