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. Appending library to each line in file of record numbers (make "p_ret_01 format"

    Appending library to each line in file of record numbers (make "p_ret_01 format"

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Additional Information
    • Article Type: General
    • Product: Aleph
    • Product Version: 20, 21, 22, 23

    Description:
    I have a file of record numbers (produced by SQL) which I want to use as input to a batch job (p_manage_40, p_manage_21, etc.). How can I add the library after the number on each line (so it looks like the form produced by p_ret_01). That is, how can I automatically change:

    000123456
    000123482
    000124869
    to:
    000123456EXU01
    000123482EXU01
    000124869EXU01

    Resolution:
    vi the file and enter this command:

    :1,$ s/$/EXU01/

    Note A: Any blank lines in the file will also have "EXU01" inserted, so blank lines should be eliminated before doing this.

    Note B: One site complained that when they did the above command they got this result:

    000123456
    EXU01
    000123482
    EXU01
    000124869
    EXU01

    [From site:] I got this figured out...I was generating the sys numbers from an SQL script file but forgot to 'SET' the linesize to 9. So in effect, the 9-character system number became 80-characters (71 blank spaces after the sys number). The appending of EXU01 to the end happened at character 81, which made it seem like it was creating a new line in unix.

    Additional Information

    append library


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Apostrophes pasted from Microsoft Word
      • Appending string to z30-barcode for a particular set of ADM numbers
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 16.02
      2. contype:kba
      3. Prod:Aleph
      4. ret-01
      5. 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