res_query_letter

The res_query_letter script is used to produce notifications that inform borrowers that the item they have reserved is missing (that is, the item that has been reserved is subject to an item query).

Usage

The script's source code is located in /usr/opt/blcmp/talis/mis/res_query_letter. To run the script log on as report or talis and enter the following command:

report -pres_query_letter -a<filename> -b<begin_date> -d<database_name> -e<end_date> -h -n<LAST> -o<filename>  -r<directory> -s<directory> -u

Standard script arguments are described here. The remaining arguments for this script are described in the following table.

Argument

Description

-b

Specifies the beginning of a date range of item query rows to be processed. Only item queries created on or since the specified date will be processed.

-e

Specifies the end of a date range of item query rows to be processed. Only item queries created on or before the specified date will be processed. If no value is used then the date will default to the date the script runs.

-n

Specifies if the script is to run from the last query processed. The only value allowed is -nLAST. The -n switch cannot be used with the -b and -e switches.

-u

Specifies that the script is to update the selected reservations to Cancelled status.  A message will be added to each letter to inform  the user of the reservation status change.

 

Parameter file

The parameter file res_query_letter is held in the /usr/opt/blcmp/talis/mis/param directory. The following additional parameters are included:

Parameter

Description

ITEM_TYPE_IN=
ITEM_TYPE_OUT=

Allows you to specify item types to be included or excluded. It is not possible to run the script with both parameters set. If no values are set then all item types are included.  Enter item type codes separated by commas.

LOCATION_IN=
LOCATION_OUT=

Allows you to specify reservation collection sites to be included or excluded. It is not possible to run the script with both parameters set. If no values are set then all reservation collection sites are included.  Enter reservation collection site codes separated by commas.

BORROWER_TYPE_IN=
BORROWER_TYPE_OUT=

Allows you to specify borrower types to be included or excluded. It is not possible to run the script with both parameters set. If no values are set then all borrower types are included.  Enter borrower type codes separated by commas.

borrower_posistion=

If you wish to display the borrower address details in the footer of the output then this parameter allows a user to state which line the address will start to be displayed from. By default the format.pl file contains the field holders and variables for displaying the borrower details in both the header and the footer. The rows need to be deleted from either the header or footer as required.

 

As well as producing output in a letter file (by default res_query_letter.out), the script also produces a report file that contains a shelf checking list sorted by item home site.  

Example report file
 

res_query_letter_loca      Reservation query letters           19/05/08 15:21:09

                           ~~~~~~~~~~~~~~~~~~~~~~~~~

Command line: res_query_letter_local -pres_query_letter_local -b01/01/08

Processing records on database 'prod_talis'
Running for dates between 01/01/08 00:00 and 19/05/08 11:59PM

Pagelength: 66
Pagination: linefeed
Item statuses: QUER
Reservations will NOT be cancelled

Total reservations processed  : 5
Total letters output          : 5

 

Item Home Site: Central
=============================

Bib ID:         371842
Control Number: 0786402571
Item Barcode:   05046114
Bib Details:    Rhodes, Gary Don, 1972-. - Lugosi : his life in films, on stage,
Shelfmark:      791.43028092LUG,RHO
Borrower:       22222222

Item Home Site: Main
=============================

Bib ID:         176885
Control Number: 0904383113
Item Barcode:   5602424185
Bib Details:    Greenwood, Victoria. - In demand / (by) Victoria Greenw
Shelfmark:      343.62(41),GRE
Borrower:       97099198

Bib ID:         83721
Control Number: 68019538
Item Barcode:   5600480711
Bib Details:    Simonian, Charles. - Fencing : fundamentals. [CD ROM]
Shelfmark:      796.86,SIM
Borrower:       12300136

Item Home Site: Site A
=============================

Bib ID:         328076
Control Number: y8743290
Item Barcode:   0380769X
Bib Details:    Goldsworthy, Andy. - Andy Goldsworthy : mountain and coast, Autu
Shelfmark:      709.2GOL,GOL
Borrower:       11111111

Item Home Site: West
=============================
Bib ID:         74300
Control Number: y0122335
Item Barcode:   5600625876
Bib Details:    Singer, Charles, 1876-1960. - From magic to science : essays on
Shelfmark:      0,
Borrower:       12300136

res_query_letter_loca              Completed                   19/05/08 15:21:10

                                   ~~~~~~~~~