Skip to main content
OCLC Support

Delete borrower or stockitem history

Learn how to delete borrower or stockitem history in Amlib.

The information that is viewed from the Borrower history screen is made up of a combination of Borrower History and Stockitem history entries. Please note that HASREAD and Report history entries history entries actually come from the Borrower history, while RETURN entries come from the Stockitem History. Libraries wishing to remove the RETURN entries will need to delete the appropriate Stockitem history.

Care should be taken when deleting histories as once the entry has been deleted it cannot be retrieved.

History Reports

Update Report Templates

The following report templates can be used in the Reports module to delete History if Update Entity is set to Y, and the report is run via the report Scheduler. The F7 Where statement is used to determine which records will be deleted.

Deletes/retains Borrower and Stockitem History records according to parameter set in Main > Supervisor > Installation – Circulation tab: Keep the last ### history records.

  • &BORHIST.QRP – Deletes Borrower History ACTIVITY records
  • &BORHICT.QRP – Deletes Borrower History REPORTS records
  • &STKHIST.QRP – Deletes Stockitem History ACTIVITY records
  • &BORFIN.QRP – Deletes Borrower Financial Transactions records

Summary Report Templates

The following report templates can be used in the Reports module for Summary reports which will just give a count of the number of records being deleted when used in the Reports module if Update Entity is set to Y, and the report is run via the report Scheduler.

  • &BORHISU.QRP – Deletes Borrower History ACTIVITY records & produces count of records deleted (based on &BORHIST.QRP)
  • &BHICTSU.QRP – Deletes Borrower History REPORTS records & produces a count of records deleted (based on &BORHICT.QRP)
  • &STKHISU.QRP – Deletes Stockitem History ACTIVITY records & produces a count of records deleted (based on &STKHIST.QRP)
  • &BFINSU.QRP – Deletes Borrower Financial Transactions records & produces a count of the records deleted (based on &BORFIN.QRP)

 Note: 

  •   To remove the RETURN and ISSUE History you will need to run the Stockitem History deletion report
  • To remove the HAS READ History you will need to run the Borrower history deletion report
    clipboard_e8c8aca205602fc22134499ae990cae0e.pngclipboard_ef5e35b43b100a99b23ecd1ce53545c54.png

Supervisor Setup

Borrower and Stockitem history records are kept until purged by the user. When they are purged the Keep the last ### history records setting will retain ### records despite any user report parameters. IF you intend to delete history based on a date range, you would always set this to 0.

  1. Launch the Amlib client.
  2. Go to Main > Supervisor > Installation – the DEFAULT Installation screen will open.
  3. Click on the Circulation tab.
  4. Scroll down to Keep the last ### history records setting.
  5. Change the Value to equal the number of records to be retained in a History deletion (if you want to all lines deleted based on your Where Statement, we highly recommend you set this to 0 )
    clipboard_e5a48fd9b77edb115e943444709d66429.png
  6. Click the F3 Save button.
  7. Then go to Installation dropdown > Advanced Copy.
  8. In the Parameter Set dropdown select Circulation.
  9. In the Source Location select DEFAULT.
  10. Tick the setting “Keep the last ### history records” in the top table.
  11. Click the Select All button next to the bottom table.
  12. Then click the F6 Copy button at the top of the screen.
    clipboard_ea2729a81e2977c922aa073b9b9c82792.png
  13. Say yes to the popup and select the Done button at the bottom of the screen.
  14. Log out of Amlib client and restart for any changes to take effect.

 Note: If set to zero, all history for the date period defined in your Where Statement will be deleted once the report is run. If the parameter in the Supervisor module is set to a particular number (for example: 8) and the loan histories in the Borrower and Stockitem records are less than that of the Keep limit, then no records will be deleted during a history purge.

 Note: For libraries running version of Amlib prior to 5.4.1, the system will keep one history record of each History Type for each borrower or item even when the Supervisor setting is set to 0. It is for this reason that libraries are recommended to upgrade to Amlib Version 5.4.1 before running Borrower and Stockitem history deletion reports if it is important that ALL history is deleted for time period.

Create History Deletion Report

Borrower

  1. Go to Main > Reports > RepBorrower.
  2. Click the F1 New button – the Select Report Format screen will appear.
  3. Highlight the Borrower History report template you would like to use – &BORHIST.QRP (Borrower History) or &BORHISU.QRP (Borrower History Summary). You should locate these templates via Template name rather than Description, as these are multi-function templates and sometimes the Description refers to this alternate functionality.
  4. Click the OK button.
  5. Type in a Description – for example: Delete History > Years Old.
  6. Ensure the Update Entity (Y/N) column is set to Y.
    clipboard_eaffdf295e2d629af76a7ba0664dc508c.png
  7. Click the F3 Save button.
  8. Select the F7 Where button to set up the selection parameters – this will bring up the Borrower Reports – Where screen.
  9. Enter the following Where search:
    1. Enter a start date: History Date >= enter a date in DD/MM/YYYY format – for example: 01/01/2010
    2. (Optional) Enter a finish date: History Date <= enter a date in DD/MM/YYYY format – for example: 10/10/2010 (a finish date is optional – if not inserted, the report will go up to the current date).
    3. (Optional) History Type LIKE READ
      (Use the Paste button to insert the parameter into the list at the bottom of the screen)
    4. (Optional) BorType = / BorType != - for example: BorType != H
    5. Click the F3 Save button when complete.
      clipboard_e96cc2f0ddebcc372fcf2838140dc56e6.png
  10. (Not required for Summary only reports) Click the F9 Order button – this will bring up the Borrower Reports – Order By screen.
    1. Select BorBarcode from the Columns list and arrow it across into the Order By list.
    2. Select and arrow History Type and History Date.
    3. Click the F3 Save button when complete.
      clipboard_e2027e8f52b34baa2a1d5cbbc17609a47.png

Stockitem

  1. Launch the Amlib client.
  2. Go to Main > Reports > RepStockitem.
  3. Click the F1 New button – the Select Report Format screen will appear.
  4. Highlight the Stockitem History report template you would like to use – &STKHIST.QRP (Stock Item History List), or &STKHISU.QRP (Delete Item History (with Summary)). You should locate these templates via Template name rather than Description, as these are multi-function templates and sometimes the Description refers to this alternate functionality.
  5. Click the OK button.
  6. Type in a Description – for example: Deleting Previous Years Loan Histories.
  7. Ensure the Create Fin (Y/N) column is set to Y.
    clipboard_ed906e5d80d1e454c8ebbd3b99adc6eda.png
  8. Click the F3 Save button.
  9. Select the F7 Where button to set up the selection parameters – this will bring up the Stockitem Reports – Where screen.
  10. Enter the following Where search:
    1. Enter a start date: History Date >= enter a date in DD/MM/YYYY format – for example: 01/01/2010
    2. (Optional) Enter a finish date: History Date <= enter a date in DD/MM/YYYY format – for example: 10/10/2010 (if not inserted, the report will go up to the current date).
    3. (Optional) History Type LIKE ISS OR History Type = ISSUE You can use ISSUE, RENEW OR RETURN
      (Use the Paste button to insert the parameter into the list at the bottom of the screen).
    4. Click the F3 Save button when complete.
      clipboard_e0fad6555012b4f4d3d1777e06793055c.png
  11. (Not required for Summary only reports) Click the F9 Order button – this will bring up the Stockitem Reports – Order By screen.
    1. Select ItemNo from the Columns list and arrow it across into the Order By list
    2. Select and arrow History Type
    3. Select and arrow History Date
    4. Click the F3 Save button when complete
      clipboard_e77bcab0afa2d0da6014a15fd1c13f320.png

Preview Report

You may view this report before printing. This will not delete the records but will show you how many records may be deleted. The final total actually deleted may be less due to the Keep the last ### history records parameter in Main > Supervisor > Installation – Circulation tab.

  1. Highlight the report you wish to run and select F8 View.
  2. The following message will appear: This type of report may use a Saved File. Do you want to select the file now?
    clipboard_e3c76cba8839fda721db00878718dbfc1.png
  3. If you would like the report to run using the entire database (rather than a Saved File) then click the No button.
  4. The report will then display:
    clipboard_efc33391e15b65e8352f31fc91ce63e48.png
  5. Select the print button to print the report.

Schedule Report

Start the Scheduler

  1. From the Reports screen, select Application > RepStartSchedule.
    clipboard_ebd96c9c997ae47971f2341b712c2435b.png
  2. The Report Scheduler screen will then open.
  3. Select your printing options: Ensure Printing, E-mail and/or Save to File are ticked (you can tick all three if you intend on printing up multiple reports using multiple formats during a session).
  4. Also decide If a report is scheduled by another user do you still want to print it? = Yes/No
    clipboard_e1d4a3cb432410f0b7616dff5099f6aaf.png
  5. Then click the OK button.
  6. After clicking OK, if you go back into the Application menu you will see that RepStartSchedule is now greyed out with a tick next to it – this indicates that the Scheduler is now running.
    clipboard_e73f0b2f90237b2f6ed27645fbd4cabc9.png

     Note: If you need to restart the scheduler at any point, you will need to log out of all Report screens (Ctrl + L) and start at the beginning of these instructions.

Scheduling the Report

  1. With your report highlighted, select the F6 Print button – the Print dialogue box will open.
  2. Select from the following options:
    1. From:
      • Database (to search the entire database)
    2. To:
      • Printer
    3. Frequency:
      • Once Only
    4. Schedule:
      • First Print Date (leave as is)
      • First Print Time (leave as is)
    5. Selected Printer:
      • You can specify any active printer on the network to print to – including virtual printer drivers such as a third party software that allows you to print to PDF (For example: CutePDF Writer)
        clipboard_eb58132da5c2f73c2678977c92c923cd0.png
  3. Once you have selected all of your settings, click the OK button

Check Print Progress

  1. You can check the progress of your reports at any time by going into Main > Reports > RepPrintProgress.
    clipboard_e75f5ba467bd03c007ac3906a1e39a2ac.png
  2. If your library uses the scheduler for a lot of reports, you can select a frequency type from the Filter drop-down menu at the top:
    clipboard_e0d62cbb1d473be049e2568baf0240fa4.png
  3. You can also click through the three tab options at the top to see the ones that are Waiting, Running, or have already been Printed.
    clipboard_e1f2d076ee0823702ea3b7a8ce55a376e.png
  4. Your report will show up in “Printed” when it is complete.
    clipboard_ee314e91d5ebc8386401dd1aefb9539bc.png