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

    How to Find HOL Records Linked to Specific BIB Records?

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

    Description:
    How can I retrieve a list of HOLdings records for a list of specific BIB records? (I can easily retrieve the list of BIB records using p_ret_01 or p_ret_03, but what is the easiest way to get the related Holdings records?)

    We have a file of BIB system numbers (XXX01) and would like to find the holdings record system numbers (XXX60) which are linked with these records.

    Resolution:
    Method 1: Instead of running p_ret_01 in the xxx01 library, run it in the xxx60 library and include this line in the xxx60/tab/tab_expand: RET expand_doc_hol_bib
    This will copy all the fields of the associated BIB record into the HOL as virtual fields for the purpose of this retrieval. Then, in running p_ret_01 in the xxx60, you can search these virtual BIB fields.
    The only question might be performance. {The inclusion of this expand could maybe double(?) the p_ret_01 run time}
    [Note: You can't run p_ret_03 in the xxx60 because it requires indexes.]

    Method 2a: If there are just a few, you could run p_ret_01 (or p_ret_03) in the BIB library and then do this:
    SQL> select substr(Z103_REC_KEY_1,6,9), substr(Z103_REC_KEY,6,9) from z103 where Z103_LKR_TYPE = 'HOL' and substr(Z103_REC_KEY_1,6,9) in ('000123456', '000234567', '000345678', <etc.>) <where the numbers are the BIB keys you want the HOLs for

    Method 2b: If the list of numbers is large, you chould load the numbers into a temporary table ("bibtemp" with a column "bibkey") in XXX01 (as described in the "Importing p_ret_01 Output into SQL" document.
    And run this SQL query in XXX01:
    SQL> select substr (Z103_REC_KEY_1,6,9), substr (Z103_REC_KEY,6,9) from z103 where Z103_LKR_LIBRARY = 'XXX0' and substr (Z103_REC_KEY_1,6,9) in (select bibkey from bibtemp) order by substr (Z103_REC_KEY_1,6,9);
    But in this case, the use of Method #1 seems better.

    Additional Information

    holdings records, bibliographic records, retrieve, list


    • Article last edited: 10/8/2013