#!/bin/ksh # this script applies local marc processing to the input file, # then runs it through the prebulk process # before applying the bulk import process # filepath filepath=/m1/local/promptcat/approvals binpath=/usr/local/bin # get name of file to be processed, from the command line if [ -z ${1} ]; then print " " print "Usage: prodimport.script filename.ext" print " where filename.ext is the marc file to" print " preprocessed and imported" print "You must be VOYAGER to run this process!" print " " exit fi marcfilenoext=${1} # drop the extension, leaving a clean file name marcfilenoext=`exec echo "${marcfilenoext}" | awk -F\. '{print $1}'` # create output file name for local preprocessing outfile=${marcfilenoext}.preimp # do local preprocessing $binpath/marcedit ${1} ${outfile} # create filenames for prebulk import process infile=${outfile} outfile=${marcfilenoext}.imp # run prebulk import /m1/voyager/wmichdb/sbin/Pprebulk \ -i$filepath/$infile \ -o$filepath/$outfile \ -c$filepath/prebulk.cfg # create input filename for the bulk import process infile=${outfile} # run the bulk import /m1/voyager/wmichdb/sbin/Pbulkimport \ -f$filepath/$infile \ -iPCTBNAPP \ -obulkimport