MARCEDIT-L Archives

August 2011

MARCEDIT-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Reese, Terry" <[log in to unmask]>
Reply To:
MarcEdit support in technical and instructional matters <[log in to unmask]>
Date:
Wed, 10 Aug 2011 07:28:49 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
In MarcEdit, there isn't a built in function that would easily let you take variable length data an pad zeros to the start of it.  Some regular expression engines like Perl have built in ways to do this, unfortunately, .NET does not (that I'm aware of).  If your data isn't variable length, for example, you know that you have 3 digits and you want to add 3 zeros to the start of your field, you could use the subfield editor to prepend the zeros to the start of the field.  For example:

Field: 019
Subfield: a
Find: ^b
Replace: 000

But this assumes that the data lengths are regular.  If you have irregular items, you'd likely need to write a script or macro.  Scripts would be easier (likely).  You could create a template using the script maker and then add the add the 5-6 lines of necessary code to the if/else block.

--TR

-----Original Message-----
From: MarcEdit support in technical and instructional matters [mailto:[log in to unmask]] On Behalf Of Margarita Perez
Sent: Wednesday, August 10, 2011 6:51 AM
To: [log in to unmask]
Subject: [MARCEDIT-L] add leading zeros

Good Morning,

Does anybody know if there a way using MarcEdit functionality to add leading zeros to a 6 digit number in the 019 field?

Thanks,

Have a great day !

Margarita Pérez Martínez
Database Maintenance - Green Library
Florida International University
11200 S.W. 8th Street
Miami, FL 33199

________________________________________________________________________

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]

ATOM RSS1 RSS2