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

    Bib records loaded with incorrect doc numbers; p_manage_18 *HOW TO FIX*

    • Article Type: General
    • Product: Aleph
    • Product Version: 20, 21, 22, 23

    Description:
    p_manage_18 was run with an input file which contained incorrect doc numbers (such as "01493nam" or "2008005672"). This resulted in incorrect bib record keys and in a too-high last-doc-number in the abc01 util g/2.

    The article "BIB and ADM system numbers out of synch"  (KB 8192-667) notes that "having large 'holes' (say, hundreds of thousands) in the bib record numbers is highly undesirable. (It causes the keyword bitmaps to be unnecessarily large.)"

    Resolution:
    To delete these records and reduce the last-doc-number to a reasonable value, do the following.

    1. (Optional) save/export the records using p_print_03 if the records were created in the GUI and you want to reload them later (with legitimate doc numbers).

    2a. Run p_ret_01 (or use "vi"), to create a file with the doc numbers in this form:

    005001701ABC01
    01493nam ABC01
    059012606ABC01
    <etc.>


    (This file is the format which p_manage_33 expects the input file to be in.)

    2b. Run p_manage_33 with the file created in step 2a as input to delete the records. You need to make sure that any BATCH-DELETE lines in the xxx01 check_doc table are commented out. If they are not, then they will prevent the proper deletion of the ADM record, the links, etc. (See the article " Delete BIB Recs Incl. Related ADM/HOL Recs (manage-33): BATCH-DELETE lines " (KB 5726.)

    3. Or, if there are relatively few records, instead of 2a and 2b you can delete the records in GUI Cataloging doing the "Total Delete" in the nav tree in the left-hand frame.

    4. Run this SQL:

    >s+ abc01
    SQL> select max(z95_doc_number) from z95;


    The purpose of the above SQL is to confirm that the deletion of the bib records has resulted in corresponding correct deletions of the z95 Word index records. If you find that there are still z95 records with the high keys, there's nothing in particular to do about it. You don't necessarily want to delete it. Jerry Specht (jerry.specht@exlibrisgroup.com) is studying this issue.

    5. Use SQL to physically delete the "DEL Y" stub records which remain after step 3.
    If the bib doc numbers are in sequence, the following SQL could be used:

    SQL-abc01> delete from z00 where z00_doc_number >= 'nnnnnnnnn' and z00_doc_number <= 'yyyyyyyyy';

    Otherwise, you will need to run the SQL individually for each doc record you have deleted.

    6. Use SQL "select max (z00_doc_number) from z00" to locate the highest key in the bib file.

    7. Use util g/2 to reset the last-doc-number to the value found in step 4.

    You should then be able to run p_manage_05, p_manage_01, etc., OK.

    Note: Sites have found that even after the deletion of these records with bad keys that the keyword indexes are corrupted (failing to give correct results on certain searches) and that p_manage_01 needs to be run to recreate the keyword index. (Contact jerry.specht@exlibrisgroup.com if you find this with your indexes.)

    Additional Information

    A scenario from a specific customer is attached. The steps are basically the same as those described in the Resolution, but with a few variations.

    Attachment

    Attached file


    • Article last edited: 1/29/2014