#cd /srv/openils/bin
PGUSER=evergreen
-PGHOST=prod-pg94-db2-sitka.sitka.bclibraries.ca
+PGHOST=dbprod-96-main-ndb2
PSQL="psql -A -t -U $PGUSER -h $PGHOST"
DATABASE=evergreen
#FULL_QUERY="select distinct id from biblio.record_entry where not deleted"
FULL_QUERY="select distinct acn.record FROM asset.call_number acn join biblio.record_entry bre on (acn.record = bre.id) where not bre.deleted and bre.active and not acn.deleted"
POSTSEC_QUERY="select distinct record FROM asset.call_number where owning_lib in (select distinct id from actor.org_unit_descendants(27)) and not deleted and label != '##URI##';"
NONEXPORTED_QUERY="select distinct acn.record FROM asset.call_number acn join biblio.record_entry bre on (acn.record = bre.id) where bre.deleted or not bre.active or acn.deleted"
-MARC_PARAMS="--config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --timeout 300 --force901 --encoding UTF-8 --onlyholdings --quiet"
+MARC_PARAMS="--config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 3 --timeout 300 --force901 --encoding UTF-8 --onlyholdings --quiet"
MARC_EXPORT_BIN="${DIR}/marc_export_custom"
# this lets us inject perl opts
MARC_EXPORT="perl ${PERLOPT} -- ${MARC_EXPORT_BIN} ${MARC_PARAMS}"