[This article was copied from the Voyager Wiki.]
I wanted to run Bulk Export on a set of bib records that had a particular MARC field with particular text in it. First, I created a query that would produce a set of BIB_ID numbers for the desired records, then I ran Pmarcexport using the M parameter (MARC ID input filename).
[People] said to create a query that would pull the BIB_ID of the records I'm interested in. Here is the query I used - kept as simple as possible.
FROM BIB_TEXT INNER JOIN BIB_ITEM ON BIB_TEXT.BIB_ID = BIB_ITEM.BIB_ID
WHERE (((GetFieldAll(GetBibBlob([BIB_TEXT]![BIB_ID]),"947")) Like "*GAPTAPE*") AND ((BIB_ITEM.ADD_DATE) Between [Choose start date] And [Choose end date]));
This let me get a list of BIB_IDs with the desired MARC tag/contents with an add date in the range I wanted.
Simple. I ran it and got a string of BIB_IDS. I futzed around with trying to export it and that didn't work very well. Instead, working in my Access query results window I selected Edit>Select All. Copy to clipboard, open up Notepad and saved as a text file there. 6470 records in a 51KB file. It's only the BIB_ID numbers.
I brought that over to /m1/voyager/xxxxxdb/sbin and then ran the export like this:
Pmarcexport -rB -mM -tgaptape.txt
Just checked everything and it looks like it worked fine. The extract ran in 2 seconds. Pretty simple as well, and I'm most definitely still learning the ropes.