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

    How can I change LDR/09 to match the MARC Character Coding Scheme?

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

    Description:
    I occasionally need to export a file of MARC records from ALEPH using p_print_03. Sometimes I export them in MARC8 (using the UTF_TO_MARC8 Character Conversion routine.) And sometimes I export them in UCS/Unicode (using no Character Conversion routine at all.) How can I be sure that the LDR/09 (byte 9 of the MARC Leader) is set correctly to match the Character Coding Scheme?

    Resolution:
    LDR/09 of the MARC record indicates the Character Coding Scheme used in the record. A blank in this position indicates that the record is encoded in MARC-8. The value “a” in this position indicates that the record is encoded in UCS/Unicode.

    The Character Conversion routine specified during execution of p_print_03 to generate a file of MARC records does not manipulate the LDR/09 at all. Whatever value happens to exist in the record in the ALEPH database will be inserted into LDR/09 – not necessarily the correct value. If the recipient of the exported file depends on the value of LDR/09 to determine the Character Coding Scheme used in the record, you should be sure to explicitly set this byte to match the Character Conversion routine you are using.

    Attached to this KB are two ALEPH fix scripts you can use for this purpose. The first (set_ldr_9_blank) inserts a blank into LDR/09. The second (set_ldr_9_a) inserts the value “a” into LDR/09. Here are the instructions for using these scripts.

    1) Put a copy of the two scripts into the $data_tab/import directories of both your Bib (xxx01) and Authority (xxx10, etc.) libraries.

    2) Add the following two lines to tab_fix in the $data_tab directory of both your Bib (xxx01) and Authority (xxx10, etc.) libraries:

    EXPM8 fix_doc_do_file_08 set_ldr_9_blank
    EXPUC fix_doc_do_file_08 set_ldr_9_a

    (Be sure the three columns line up correctly.)

    3) When you run p_print_03 and use the Character Conversion routine UTF_TO_MARC8 to convert the exported MARC records to MARC-8, specify EXPM8 in the Fix Routine field.

    4) When you run p_print_03 and specify no Character Conversion routine to export the records in Unicode, specify EXPUC in the Fix Routine field.

    NOTE: Copies of the two fix scripts in Rich Text Format (rtf) have also been attached to facilitate opening/editing. These can be opened in Windows Wordpad.


    • Article last edited: 10/8/2013