MARC Report Batchmode (command-line module)

This module was added in version 238.

The available options are:

C:\Program Files\TMQ\MARC Report>mrbatch --help

mrbatch: commandline version of MARC Report's BatchMode, (C)2015 TMQ, Inc.

Command-line parameters:
--help        show this parameter list and exit
--marc=F      required; F is the full path of the MARC file to check for errors
--rept=F      optional; F is the full path of the report file to create
--ini=F       optional; F is the full path of the profile to take options from
--start=N     optional; N is the record number to start at if not the first
--stop=N      optional; N is the record number to stop at if not the last
--vers        display the version of the program and exit

Thus, the simplest possible command needed to run MARC Report batchmode would be:

"C:\Program Files (x86)\TMQ\MARC Report\mrbatch" --marcfilename="d:\marc\daily.mrc"

On success, the utility returns a code of 0. If an optional report filename was not specified as a parameter, the program will then append (after the result code) the name of the report file that was generated:

batchmode result: 0
d:\marc\marcrept-150212(2).txt

Unlike the windows version of BatchMode, the command-line version cannot be gracefully interrupted. Thus, pressing <Ctrl>C during a process will generate an unsuccessful result.

Notes

If not specified on the command-line, the program automatically generates a filename for the report using the path of the MARC file, followed by 'marcrept', followed by a sequence number. In the above example, the name of the report would be something like:

d:\marc\marcrept-150214.txt

Therefore, if you are not specifying a report filename, then the location of the MARC file must be a folder in which the user that is running the job has write permission.


The key to using Batchmode from the command-line will be to set-up a mechanism to automate the many options that the program uses for validation and cataloging checks.

For example, you may want to run batch mode every night on all the new files that you receive, but each new file may need its own special customization to produce the precise error report that you want.

Fortunately, the program already includes a way to do this, something that we call Option Profiles. You may thus use the MARC Report interface to setup as many different configuration profiles as you need, in effect, creating a library of profiles that can be referenced in your batchmode scripts.

Once you have designed the profiles, you will be able to use them in scripts like this:

cd "C:\Program Files\TMQ\MARC Report"
mrbatch --marc="E:\vendor1.mrc" --ini="Z:\MARC Report\Options\profile1.ini"
mrbatch --marc="E:\vendor2.mrc" --ini="Z:\MARC Report\Options\profile2.ini"
mrbatch --marc="E:\vendor3.mrc" --ini="Z:\MARC Report\Options\profile3.ini"

And in the morning, you should have three reports waiting for you :-)

On the other hand, if you like coding things on the command-line, you could copy your marcreport.ini to a working folder, and then just tweak–in your script–the parameters that need to be changed before each batch mode run.

Here is a list of options in marcreport.ini that might be useful in a batchmode run.

help/mrbatch.txt · Last modified: 2015/02/12 11:43 (external edit)
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed