Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Deleting orphaned HOL records (HOL records whose items have been deleted)

    • Article Type: General
    • Product: Aleph
    • Product Version: 21

    Description:
    We are in the process of extensive deselection of materials, especially duplicate copies. One of our librarians has been deleting items and just was told today that she should also delete the holding at the same time.

    Is there a process to run to identify and delete orphaned holdings?

    Resolution:
    I suggest that you run the following SQL (from KB 8192-27444) to locate non-deleted HOL records which do not have any items linked to them:

    > s+ abc50
    SQL> select substr (z103_rec_key,6,9) from abc60.z103 where substr (z103_rec_key,1,5) = 'ABC60' minus select Z30_HOL_DOC_NUMBER_X from z30;

    Then:

    a. spot-check to make sure that the HOL records retrieved by the above query *are* ones which should be deleted

    b. >s+ abc50
    set echo off
    set pause off
    set feed off
    set heading off
    spool hol_spool
    select substr (z103_rec_key,6,9) from inl60.z103 where substr (z103_rec_key,1,5) = 'ABC60' minus select Z30_HOL_DOC_NUMBER_X from z30;
    spool off;

    The preceding will create a file "hol_spool".

    c. Use the method described in KB 8192-1591 to append "ABC60" to each doc number in the hol_spool file.

    d. connect to abc60 and run the p_file_03 service to back up the HOL doc records

    e. still connected to abc60, run p_manage_21, with the file from step c as input, to add a "DEL $$aY" to each record; this is described in KB 16384-32913 (except that's for an ADM doc record, while you will be doing it for abc60 HOL records)\

    f. start the abc60 ue_01 (if it's not already running) to process the z07 indexing records generated by p_manage_21; ue_01 will delete the HOL records (leaving only a "stub" record).


    • Article last edited: 10/8/2013
    • Was this article helpful?