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

    In multi-ADM: Able to delete vendor record even though it's being used

     

    • Product: Aleph
    • Product Version: 20, 21, 22, 23
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care

     

    Description

    In our consortium, with multiple ADM libraries, we manually deleted some tier records in our libraries, and sometimes a complete global vendor record was also deleted. Some of our libraries have reported that vendor records they have used in the past, are now missing. 

    Our understanding is that if a vendor record is used by a library in an order and/or invoice, the system will not allow it to be deleted. 

    Resolution

    We tested this on our server and found that, when  trying to delete a vendor used in an order record, we got this message: "Vendor code has linked orders. Unable to delete vendor." 

    This is message 0023 in ./error_eng/pc_com_c0114. The pc_com_c0114 program has this code: 

    CHECK-VENDOR-DUTIES SECTION. 
    ... 
    CALL "io_z79_get" USING 
        ACTIVE-LIBRARY 
        Z79-INDEX 
        ERROR-CODE 
    END-CALL. 

    IF ERROR-CODE = ZERO 
    THEN 
        MOVE 23 TO C0114-ERROR-CODE 

    It's checking to see if there's a z79 (order index) record with this vendor in it. 

    In this case, the vendor being deleted has the vendor code "TOUZOT". This sql shows the z79 entry: 

       usm50@ALEPH232> select z79_rec_key from z79 where z79_rec_key like '%touzot%'; 

       Z79_REC_KEY 
       ------------------------------------------------------ 
       V touzot 00000060200001 

    If a vendor has such a z79 record, its deletion will not be permitted. (This CHECK-VENDOR-DUTIES code is executed unconditionally by pc_com_c0114 in the VENDOR-DELETE section of the program.) 

    Every order (z68) with a z68_vendor_code in it should have a z79 record like this for the vendor. 

     

    Additional Information

    Question: in the case of a global vendor, are we correct in understanding that each ADM does not have its own Z70 vendor record, but there's just one which is shared across ADMs? And, if that's the case, could it be that in these cases, there is no z79 in this ADM library, but, rather, one in another ADM -- and the program isn't checking the other? 

    Please do this following on your test server, if you can: 

    1. Find or create an "expendable" vendor with an order linked to it in a different ADM 

    2. Do SQL like this to see which ADMs have a z79 for vendor: 

       SQL> select z79_rec_key from z79 where z79_rec_key like '%touzot%'; 

    3. If there is no z79 in the ADM where the deletion would be performed, then try deleting the vendor in that ADM. 

    (Our server has VENDOR-SHARING=0, so this wouldn't be easy for me to test.) 

     


    • Article last edited: 5-Feb-2018