Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. Fix routine to merge 020 tags

    Fix routine to merge 020 tags

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    • Article Type: General
    • Product: Aleph
    • Product Version: 18.01

    Description:
    I have records that have multiple 020 tag fields. The first record has a subfield a, while each subsequent 020 tags have a subfield z. I want to concatentate the first 020 tag subfield a with the subfield z of the other 020 tags. As an example:

    Input
    020 L $$a0684314290 (electronic book)
    020 L $$z0684312573
    020 L $$z0028658078 (v. 1 : alk paper)

    what I want as a result is one record of:

    020 L $$a0684314290 (electronic book)$$z0684312573$$z0028658078 (v. 1 : alk paper)

    deleting all the remaing 020 tag fields with the subfield z only.

    In NDU01/tab/import, I created a fix routine called gvrl.fix. This uses the CONCATENATE-FIELDS option. However, it concatenates the subfield a to each subsequent subfield z. Using the example above, my output looks like this:

    020 L $$a0684314290 (electronic book)$$a0684314290 (electronic book)
    020 L $$z0684312573$$a0684314290 (electronic book)
    020 L $$z0028658078 (v. 1 : alk paper)$$a0028659937 (electronic book)

    Is this the right routine I should use or is there a better one? If this is the right one, how do I use it to get the results I want? [ <Phil Andrzejewski > ]
    --------------------------------------------------------------------------------
    [ <Randy Menakes > ]
    [ <Randy Menakes > ]

    Resolution:
    Here is a version of a script that should work in all cases. If there are more than one 020, only subsequent 020's with a single subfield of $z will be concatenated with the first 020. Subsequent 020 fields that include a $a won't be touched.

    !-!!!!!-!!-!-!!!-!!!-!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1 020## 00002 COND-LOAD-VAL-FIELD N
    1 020## 00002 CHANGE-FIELD 02A
    1 020## 00002 CHANGE-FIELD 02B
    1 020## 00002 CHANGE-FIELD 02C
    1 02A## COPY-FIELD 02X
    1 02B## COPY-FIELD 02Y
    1 02C## COPY-FIELD 02Z
    1 02X## DELETE-FIELD-COND Y,$$a
    1 02Y## DELETE-FIELD-COND Y,$$a
    1 02Z## DELETE-FIELD-COND Y,$$a
    1 020## CONCATENATE-FIELDS 02X
    1 020## CONCATENATE-FIELDS 02Y
    1 020## CONCATENATE-FIELDS 02Z
    1 02X## DELETE-FIELD
    1 02Y## DELETE-FIELD
    1 02Z## DELETE-FIELD
    1 02A## DELETE-FIELD-COND N,$$a
    1 02B## DELETE-FIELD-COND N,$$a
    1 02C## DELETE-FIELD-COND N,$$a
    1 02A## CHANGE-FIELD 020
    1 02B## CHANGE-FIELD 020
    1 02C## CHANGE-FIELD 020


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Fix Routine fix_doc_sort Does Not Work
      • Fix script for loading records into Aleph does not sort fields properly
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 18.01
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved